ItsMods

Full Version: Spawn Message Playing on Respawn?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm making some mods based off of Yamato's OMA Mod for Beginners (Thanks, BTW, it helped! Big Grin), and I set up a custom spawn message. When you spawn in, it displays all of the text I want it to, but every time you die, it reappears on the screen. It doesn't make sense, since it is in the onPlayerSpawned thread so it should be done after the first time, but I don't know. Here's what I have

http://pastebin.com/jxcXqUyy
OnPlayerSpawned is called every time you spawn....
What you can do is set a local variable like self.hi = 1 and do a check on the text like if(self.hi !=1){ textcode } And put self.hi == 0 on onplayerconnect.
(07-09-2013, 17:15)DidUknowiPwn Wrote: [ -> ]OnPlayerSpawned is called every time you spawn....
What you can do is set a local variable like self.hi = 1 and do a check on the text like if(self.hi !=1){ textcode } And put self.hi == 0 on onplayerconnect.

Can you edit the pastebiun link i set up and resend it to me?I'm not sure what you mean,m I'm still a beginner
Add something like this to onPlayerConnect() and then add the code of the function I made

Code:
onPlayerConnect()
{
    for( ; ; )
    {
        level waittill( "connected", player );
        player thread WelcomeAfterSpawn(); //THIS
        player thread onPlayerSpawned();
    }
}

WelcomeAfterSpawn()
{
    self waittill( "spawned_player" );
    YOUR MESSAGE CODE HERE
}
That too Big Grin
OMG Yamato your a genius thanks again, it works Big Grin Much appreciated now I can successfully release my mod! This is so cool

Is there a way to do a private release so just a few people can test it and tell me things to improve?

Thanks!
Just send the mod as a private message to people who want it?
(07-11-2013, 05:45)DidUknowiPwn Wrote: [ -> ]Just send the mod as a private message to people who want it?

Do you and Yamato want to try it? It's 3 basic mods I made that kind of "edits" the game mode. Just reply in this thread if you want to.


Thanks!