• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] instant updates and instant units whit trigger

Status
Not open for further replies.
Level 9
Joined
Aug 15, 2007
Messages
261
Code:
try training
    Events
       
try training
    Events
        Unit - A unit Begins training a unit
    Conditions
    Actions
Unit - Order (Triggering unit) to Stop

        Wait 0.01 seconds
 
Unit - Create 1 (Trained unit-type) for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees

that doesnt work
creates 1 unit than i have to stop the new unit from beeng trained manualy and than it works again
how can i stop the training unit so i can create them instantly


allso i wanna be doing the same for reserch but thats how far i got

Events
Unit - A unit Begins research
Conditions
Actions

what actions to use?
 
need it whit a trigger
the map has modes and one of them is chaos rigged
allso i am thinking of mixed mode and when rigged or chaos rigged are on i need that trigger to work


Unit - Order (Triggering unit) to Stop
thars the wrong one
 
Last edited:
I am not sure if you are looking for Stop(S), rather than Cancel(Esc) ?

If there is no Cancel in the GUI list try looking for the command card abilities somewhere and taking the raw code.

Edit// Iceman fast ! :D
 
Try using
  • Custom script:call IssueImmediateOrderById(GetTriggerUnit(),851976)
^it should order cancel for the unit. If it doesn't work, try it after wait-0 seconds.
try training
Events
Unit - A unit Begins training a unit
Conditions
Actions
Custom script: call IssueImmediateOrderById(GetTriggerUnit(),851976)
Wait 0.01 seconds
Unit - Create 1 (Trained unit-type) for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees


that did it thanks


now how to make the reserch trigger in gui
 
There's somewhere a action to set a player's research level for <something>. If you catch the event you maybe can set it just, and cancel the research.
Player - Set the current research level of (Researched tech-type) to ((Current research level of (Researched tech-type) for (Triggering player)) + 1) for (Triggering player)

ok time to try but i dont know how to stop it or let the game take the resources needed...


works as a charm but the unit summoning trigger returns the resources needed for the unit becose it cansels it...
what can i use to take the gold from the curent player

Testing that:

Player - Add (((Triggering player) Current gold) - (Supply used by (Triggering unit))) to (Triggering player) Current gold


No adds 5-6 k every unit trained!!!!


how to make the trigger take resouces equals the unit cost?
 
Last edited:
works as a charm but the unit summoning trigger returns the resources needed for the unit becose it cansels it...
what can i use to take the gold from the curent player
Save the gold and lumber of the owning player into integer variables, cancel the unit production then immediately set the gold and lumber of the owning player to what you previously saved in integer variables. It might just be that simple. If not then one will need a system to track cancelling the refunds that fires off a 0 second timeout timer.
 
Save the gold and lumber of the owning player into integer variables, cancel the unit production then immediately set the gold and lumber of the owning player to what you previously saved in integer variables. It might just be that simple. If not then one will need a system to track cancelling the refunds that fires off a 0 second timeout timer.

works perfect
for everyone who need that trigger


train units instantly
Events
Unit - A unit Begins training a unit
Conditions
((Owner of (Triggering unit)) is in ChaosGroup) Equal to True
Actions
Set goldint = ((Owner of (Triggering unit)) Current gold)
Set woodint = ((Owner of (Triggering unit)) Current lumber)
Custom script: call IssueImmediateOrderById(GetTriggerUnit(),851976)
Player - Set (Owner of (Triggering unit)) Current gold to goldint
Player - Set (Owner of (Triggering unit)) Current lumber to woodint
Wait 0.01 seconds
Unit - Create 1 (Trained unit-type) for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
 
Last edited:
Status
Not open for further replies.
Back
Top