• 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.

Mounting or moving units using custom script coordinates

Status
Not open for further replies.
Level 5
Joined
Dec 21, 2008
Messages
101
I remembered seeing a map with a tank mounted with 4 gunners.. I checked and no its not a whole model but instead having 4 gunners mounted on the tank using this custom script.. now i don't know how to start :S if someone could help me that'll be great..

I've lost the reference.. was like months ago
 
How did this find its way into "Triggers & Scripts"? Moved to "Texturing and Surfacing".

What does a trigger request have to do with texturing?


Edit: might as well answer the question:

  • Example Trigger
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set tank = Some unit #1
      • Set extra_gun[0] = Some unit #2
      • Set extra_gun[1] = Some unit #3
      • Set Point = (Position of tank)
      • Set Point2 = (Point offset by 100.00 towards 0.00 degrees)
      • Custom script: call SetUnitX( udg_extra_gun[0], GetLocationX(udg_Point2) )
      • Custom script: call SetUnitY( udg_extra_gun[0], GetLocationY(udg_Point2) )
      • Custom script: call RemoveLocation(udg_Point2)
      • Set Point2 = (Point offset by 100.00 towards 180.00 degrees)
      • Custom script: call SetUnitX( udg_extra_gun[1], GetLocationX(udg_Point2) )
      • Custom script: call SetUnitY( udg_extra_gun[1], GetLocationY(udg_Point2) )
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call RemoveLocation(udg_Point2)
Note that the unit variables can be set in a separate trigger. Also, the attached units should have their collision taken away or set to flying or given locust or something similar to avoid problems.
 
Yes, wrong forum, misread the post as I thought you were looking for a model. Honest mistake.

But this doesn't belong in "Triggers & Scripts", it belongs in World Editor Help Zone.

Triggers & Scripts
In this forum you may ask for help on fixing a trigger or script. Need help getting started with a trigger? If so, this is not the right place - please use the World Editor Help Zone.

Next time. Glad that this solved your problem.
 
Status
Not open for further replies.
Top