HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need Help Triggering New Skill (Insanity)

09-03-2003, 05:34 AM#1
Thunder-Hunter
Ok, If you look on my new heros/map thread you can see what it does. For those of us who are lazy (like me) here it is:

Insanity
------------
Target Unit loses control, cannot recive orders, and will attack nearby units at random. Duration Increases with level (10/15/25).

I have a small idea how to do this but I need to make this skill usable for up to 8 players. Ie: Player 1 uses skill, target unit loses control. Then Player 2 uses skill, and another unit loses control. The units will need to be able to revert back to origanel (or current as in CHARM skill) owners.

If you can make this for me (or tell me how to) I will be very grateful. If you could, not needed though, also tell me how to make floating text appear and move with the unit displaying how much time left till revert owners.
09-03-2003, 06:02 AM#2
Vraq
First, make a Unit array and an Integer array.
Every time "Insanity" is cast on a Unit, add it to this array - and turn on a trigger similar to the following:

EVENTS:
Periodic Event occuring every 1.0 second

CONDITIONS:

ACTIONS:
For every unit in the Unit array do...
...Issue order to attack some unit near them
increment their Integer
if (Integer) equals (10/15/25) then remove that unit from the Unit array
if number of Units in the Unit array equals 0 then turn off (this trigger)
09-03-2003, 06:34 AM#3
Raptor--
as for floating text, i'd use custom values to assign each unit a different reference number, then use the reference number to index a floatingtext array (as well as the integer counter, but thats up to you), using the array simply display the integer counter above the unit by doing 'remove floatingtext[x]' and create floatingtext[x] with message integercounter[x]

of course, it would have to be done every 0.01 seconds if you actually want it to smoothly follow a unit, otherwise it will be kinda choppy
09-03-2003, 05:55 PM#4
Sagan
To make the unit attack everything I would give it to a computer player which isn't allied with anyone.
When the spell is casted, add the target unit to a unit group array, with the number of the owning player.
When the spell is over, simply check for each integer a from 0 to 7 (for 8 players) do if (unit is in (unit group array [for loop integer a])) then do change owner to (player (integer a)).
09-03-2003, 06:24 PM#5
Thunder-Hunter
aye could someone just make a demo map for me? This is confusing...
09-04-2003, 01:35 AM#6
Furio
I think I did a spell like this (or saw one) not to long ago, basically the way I did it was there was a computer player who controlled all units who were affected by the spell. Based on triggers It's an point blank area of effect spell heres the trigger string.
Confusion
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to xxx
Actions
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Unit - Order (Picked unit) to Attack (Random unit from (Units within 500.00 of (Position of (Picked unit)))))
Not sure if that will help you but there you go.
09-04-2003, 05:29 AM#7
Hivemind
Just have a trigger add the Aloc skill. Put the unit into a group (so you can return it after the wait command) and wait for the duration of the spell then remove the ability. It will have the side effect of making the unit invulerable though.
09-04-2003, 11:35 AM#8
Bloodlust
The Action should start a timer (one for every player...) and put the unit to "neutral hostile" and at the end of the timer back, maybe u need another variable for the player it belongs to