Page 1 of 1

respawing units

PostPosted: Wed May 14, 2008 12:59 am
by deamonslayer4292
im makeing an arcade game but i cant get the charecter to respawn without hitting a button i need him to respawn 3 times
also i need help with getting text to show

Re: respawing units

PostPosted: Wed May 14, 2008 2:15 am
by catacomber
I can't help you with respawning units but I might be able to help you with the text if you tell me more about your problem. Do you mean it doesn't show when you do an event or action or it doesn't show period, at all?

Re: respawing units

PostPosted: Wed May 14, 2008 4:44 am
by DST
You can use a timer or activation even to respawn him...i use a combination of both.

My 'lives meter' controls the spawning/game over sequences.

whenever player 1 dies, he sends an activation even to the life meter.

The life meter responds with a case switch like this:
Code: Select all
lives-=1;
switch (lives){
case 0:
whatever the 'game over/continue' actions would be
break;
case 1:
CreateTimer("Event Actor", "timername", timerlength);
break;
case 2:
CreateTimer("Event Actor", "timername", timerlength);
break;
case 3:
CreateTimer("Event Actor", "timername", timerlength);
break;
}


then on that timer, life meter does this:
Code: Select all
CreateActor("player1", "animationname", "no parent", "no path", x, y, true);


Hope this helps

Re: respawing units

PostPosted: Wed May 14, 2008 10:26 am
by deamonslayer4292
alright ill try this, thanks
Wth the text i cant even get it to show up

Re: respawing units

PostPosted: Wed May 14, 2008 2:05 pm
by catacomber
Adding Text:

Create a normal actor, give it a name like f.e. score and hit the text button top right.

You have to add a font before anything will happen.

You can add fonts from your computer. See the long bar with the little arrow at the right side? Hit the button to add the TT fonts from your computer. Open file: click on font you want.

There are choices there (buttons, drop down menus) to adjust the size -- 12 is good--you can adjust whether you want it bold or not. I use smooth also --there's a button there to choose that. You can even adjust the color--where the white square is.

Then once you have your font in type the text you want your text actor to display in the gray box.

Some choices would be "Score" or "HP" etc.

Hit OK. Now you should have your text on your game editor workspace. Push it where you want it or move it out of the way if you don't want to use it right away.

Have you gotten that far? I hope this helps.

If you tell me what you want to do with the text, I may be able to help you more.

RPG Talk demo is good for text. So is Fortune Cookie demo.

Re: respawing units

PostPosted: Wed May 14, 2008 9:23 pm
by deamonslayer4292
i was making an opening screen like the name of the game im useing as a school project

Re: respawing units

PostPosted: Wed May 14, 2008 9:27 pm
by catacomber
That's how to do it then. Make your background and then make your text appear by making text actors -- you could make one text actor for one bunch of text in one place like Play another for the name of the game. It's not that hard. I could send you one that I did for mine if you pm me your email address. But Fortune Cookie demo is the same thing. :D

You can "lock" your text actors so they don't slide around.

First draw an interesting background for the backdrop of your title screen. Then position your text actors. On mouse down (or key down) you load the game from the title screen as the player hits the text actor Play.

Re: respawing units

PostPosted: Thu May 15, 2008 1:33 am
by DST
A note on text actors:

You can either use strcpy/sprintf to CHANGE the text of a text actor, (but that can take time to tweak it because you have to trigger the command to see the text) OR

You can clone the text actor, add different text to each one, then use the GETCLONE 2 script to change the xy or transp of each of the clones....I find this method much simpler!

GetClone2: http://game-editor.com/forum/viewtopic.php?t=711