Staredit Network

Staredit Network -> UMS Assistance -> Grenade Problem
Report, edit, etc...Posted by VizuaL on 2005-09-05 at 23:04:07
My Concept is that When you use ur grenade it centers location on the grenade and creates explosions. my problem is that the grenade is an infested terren and it suicides. so when it centers it centers on nothing, which means it creates the explosions in the middle. can someone help me out here in getting it so that the epxlosion wil center where the grenade blew up. thanks
helpsmilie.gif
Report, edit, etc...Posted by Vindexus on 2005-09-05 at 23:18:30
You'll need to use Hyper Triggers for this.


Trigger
Description:
Center Location
Players:
¤ Human Player
Conditions:
¤ Current player commands at least 1 Infested Terran
Actions:
¤ Center location labeled "Grenade" on all "Infested Terran" owned by Current player
at anywhere.
¤ Preserve Trigger.



Trigger
Description:
Grenade Explodes
Players:
¤ Human Player
Conditions:
¤ Current player commands exactly 0 Infested Terran
¤ Current player has suffered exactly 0 deaths of Infested Terran
Actions:
¤ Create 9 Wraiths at Grenade for Current player
¤ Kill all wariths for Current Player
¤ Kill 9 enemy units at Grenade
¤ Create 1 Infested Terran at Grenade Spawn for Current Player
¤ Preserve Trigger


If you're using this for a map where you are a sole unit (like a zombie shooter) there is a much cooler method I came up with that uses a scourge instead of an infested terran. Basically whenever you ordered your marine to move, the scourge would follow the marine, but whenever you ordered the scourge to move it become unselectable and 6 seconds later it would explode. It'll take me some time to set it up so I'll only post it if you really want it.
Report, edit, etc...Posted by VizuaL on 2005-09-05 at 23:24:42
hmm the 2nd trigger u gave me is the trigger i had with the problem u see when the infested terren dies, there is no place to center a location, so it will center in the middle, and yes i have hyper triggers. althought i did not add the Deathcounters. can u plz explain wat Grenade spawn is and explain how ur trigger will work?
Report, edit, etc...Posted by Vindexus on 2005-09-05 at 23:30:21
What the first trigger is doing is only centering the location when you actually own infested terran. So once your terran kills itself, the location stops trying to center itself on a unit that doesn't exist and just stays at the last spot the terran was located.

The second trigger checks to see that your infested terran has killed itself. If you don't have one, and you haven't had one killed, that means that your terran has attacked, so the grenade effects take place at the last spot the terran was before it died.

I added the create grenade action because without the second trigger will continue firing over and over. You'll have to tell me how people aquire grenades for me to make it specific to your map; my method above assumes that you will always get a new grenade after you use the first one.
Report, edit, etc...Posted by VizuaL on 2005-09-06 at 00:16:41
oh no, u get one at start by default, u pick up grenades
Report, edit, etc...Posted by Vindexus on 2005-09-06 at 00:18:12
How do you use them? Do you like unload a unit from a dropship and then an Infested Terran gets created on your main character?
Report, edit, etc...Posted by VizuaL on 2005-09-06 at 00:19:45
correct how the hell did u know =D
Report, edit, etc...Posted by Vindexus on 2005-09-06 at 00:42:39
Because it's the method I used in my map with the scourge thingy. Anyway here's what you do. Basically I added a Death Counter to show when you started using a grenade.


Trigger
Description:
Use Grenade
Players:
¤ Human Players
Conditions:
¤ Current player unloads one grenade
Actions:
¤ Set deaths for Current player: Add 1 for Using Grenades
¤ Use AI: Enter Transport
¤ Create one Grenade at main character
¤ Preserve Trigger



Trigger
Description:
Center Location
Players:
¤ Human Player
Conditions:
¤ Current player commands at least 1 Infested Terran
Actions:
¤ Center location labeled "Grenade" on all "Infested Terran" owned by Current player
at anywhere.
¤ Preserve Trigger.



Trigger
Description:
Grenade Explodes
Players:
¤ Human Player
Conditions:
¤ Current player commands exactly 0 Infested Terran
¤ Current player has suffered exactly 1 deaths of Using Grenade
Actions:
¤ Create 9 Wraiths at Grenade for Current player
¤ Kill all wariths for Current Player
¤ Kill 9 enemy units at Grenade
¤ Create 1 Infested Terran at Grenade Spawn for Current Player
¤ Set deaths for current player: Subtract 1 for Using Grenades
¤ Preserve Trigger


Note: If you don't make the Infested Terran invincible the grenade will fire if he gets killed.
Report, edit, etc...Posted by VizuaL on 2005-09-06 at 00:44:56
Hah i got it, y dont i just set the deaths back to Zero :slaps self in the head:

ADDITION:
hmm very well but y do u have the Enter AI Script thingy, i dont want it to be reusable
>.<

ADDITION:
but thx, ill try it now
Next Page (1)