I was making this game where if my character buys an invincibility potion, and is pressing the number 5 on the keyboard he would defeat all of the enemies by touching them. Also, I made it that if the enemy is touching the main character, the main character would lose 10 life points. How do I make it so that both of these can work? If I work it right now, I am losing life while I am Invincible.
Now for my second problem. Right now I need to hold down the 5 button on the keyboard and be touching the enemy for him to die. I want it so that you have to only press the 5 button once and you can kill all of the enemies. I also want the Invincibility to wear off after 15 seconds. Help me Please!!!!!!
Offline
Problem #2 Answer:
Use a script like this to tell the enemies to be killed when 5 is pressed
<when[ 5 ]key pressed>
<broadcast[ something
For invincibility to wear off after fifteen seconds, include this in a script
<wait( 15 )secs>
I'm not the best help, so maybe someone else can help. Good Luck, I can't wait to see what you design!
Last edited by coka (2010-06-08 20:11:24)
Offline
OK heres how it can work for your first problem Maybe when your Main Character buys the invincibility potion and presses five you can do this <when[ 5]key pressed> and do how you buy the invincibility potion<switch to costume[ 2( costume 2 must be a different color for the whole main character as costume1)<wait( 15 )secsc><switch to costume[ 1 . This should take care of your problems!
Last edited by 4lover (2010-06-09 14:24:10)
Offline
As an answer to your first problem, use this script.
<when[5]key pressed>
Then, copy all of the character's 'moving' costumes and 'standing' costumes. Outline them in a different color (green, blue). If you want your enemies to go away when killed, give them this script.
<when green flag clicked>
<forever>
<if> <touching color[ what color on the outline ]
<hide>
Hope that answers your question!
Offline
Problem 2 sound-effects:
[blocks]<when I receive[ invincible]>
<play sound[ invincible]>
<wait( 10 )secs>
<play sound[ almostnoinvincible]>
<repeat(5)>
<switch to costume[ normal]>
<wait( 1 )secs>
<switch to costume[ invincible]>
<end> [/blocks]
There was a typo in the forum block specs... secsc is wrong, it's secs.
Oh and my pc will restart in 6 min 30 secs, bye!
Last edited by scratchisthebest (2010-06-10 08:09:12)
Offline