HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jet Packers...need help

06-19-2004, 08:23 PM#1
azndragon1313
I like to make maps as a hobby and in my newest one, ive created a jet packer. As u can probably guess, he flies. However, it takes mana to both take off and land (i actually made 2 units, 1 that flies and 1 that lands and modified the raven ability). What i want to do is make it so that if you run out of mana while you are flying, the jet packer will die. However, im not sure on how to go about it because im not very good with triggers. Any help would be appreciated. O wait, almost forgot to mention that when ure flying, u steadily lose mana.
06-20-2004, 02:01 AM#2
DoN_Rpg
easy...go to the jetpacker flying mode unit and find mana regeneration rate...set it to a negative...like -3....then he will steadily lose mana like u said....and to make him die when his mana hits 0

event: units mana becomes less than or equal to 0
condition:none
actions: unit kill triggering unit

hope that helps :D
06-20-2004, 03:33 AM#3
azndragon1313
it does help but unfortunately its not that simple. It asks me to specify which unit i want and im not sure how to make it kill Jetpackers in general.
06-20-2004, 03:55 AM#4
Kaluo
Quote:
Originally Posted by azndragon1313
it does help but unfortunately its not that simple. It asks me to specify which unit i want and im not sure how to make it kill Jetpackers in general.


just do
event - time periodic - every 1 second of gametime
action - pick all units matching condition
and (all conditions are true)
Unit type of matching unit equal to jetpack flyer
Current mana of matching unit less than or equal to 3
loop actions
play picked unit death animation and kill picked unit or whatever you want to happen.
06-20-2004, 04:17 AM#5
azndragon1313
i followed the trigger and it looks like it would work perfectly but i didnt. I noticed u said "Loop Actions". well that may be my problem because i have no idea how to do that so i didnt. Please explain that part. im sory for being such a noob. also, since there was no "action - pick all units matching condition" i had to use the "action - pick all units in playable map area and matching conditions and do actions". Im not sure if that made any difference or not,
06-20-2004, 04:29 AM#6
DoN_Rpg
do as followed: make jetpacker flying mode have -3 or whatever mana regeneration...next do this in the triggers

event:
units mana becomes less than or equal to 0
condition:
unit type of triggering unit equal to jetpacker flying mode
action:
unit kill triggering unit

that should work...if it doesnt then i dont know :\
06-20-2004, 04:36 AM#7
azndragon1313
unfortunately DOn, the generic unit event does not include "unit's mana is less than or equal to.." only specified unit event has that. it seems like Kaluo's would work but i know im doing something wrong, just not sure what.
06-20-2004, 04:43 AM#8
DoN_Rpg
ah....careless mistake of mine....my bad ^_^ ...ok gimmie a sec i can do this
06-20-2004, 04:44 AM#9
azndragon1313
okay wait i finally figured out what the looping actions thingy is, but it still does not work...i am so confused....
06-20-2004, 04:47 AM#10
azndragon1313
OK i finally figured it out lol for the very last part i used matching unit instead of picked unit. Wow WE is picky but thanks so much guys u made my night,
06-20-2004, 04:53 AM#11
DoN_Rpg
alright i think i got this....ur gonna have to make 2 triggers...first one

event:
unit begins channeling an ability
condition: ability equal to takeoff (or whatever ur ability is called to take off)
action:
set "variablename" to casting unit

2nd trigger

event:
every 0.1 second of the game
condition:none
actions: if(real comparison) mana of "variablename" is less than or equal to 3 then do unit kill triggering unit

remember that the "variablename" variable must be a "unit" variable
06-20-2004, 04:55 AM#12
azndragon1313
thank you DoN i have no doubt that your way will work and i thank you for trying so hard to help me. your help is much appreciated but i did figure out the other way lol and it works. once again however, thank you for the help
06-20-2004, 04:56 AM#13
DoN_Rpg
lol u figured it out before i finished typing reply...o well u can use either way i suppose