• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Points should be MUI (Interger) ?

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Like "Random Point in Region". Should it be MUI ?

For example:

  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set MUI = mui +1
      • set Unit(MUI) = Unit
      • SetPoint = Random Pt in My Fictonal region
      • Wait x seconds
      • Set IUM = Ium +1
      • Set Unit(IUM) = Unit
      • Revive Unit(IUM) in Point
Should the Point be Interger too ?
 
Level 21
Joined
Aug 13, 2011
Messages
739
The wait just delays the actions, so you can still refer to the unit as triggering unit (or dying unit) and set the point after the wait:
  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Wait x seconds
      • Set Point = (Random point in My Fictional Region)
      • Hero - Instantly revive (Triggering unit) at Point, Show revival graphics
      • Custom script: call RemoveLocation (udg_Point)
 
  • Like
Reactions: hdm
Level 9
Joined
Feb 15, 2013
Messages
372
The wait just delays the actions, so you can still refer to the unit as triggering unit (or dying unit) and set the point after the wait:
  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Wait x seconds
      • Set Point = (Random point in My Fictional Region)
      • Hero - Instantly revive (Triggering unit) at Point, Show revival graphics
      • Custom script: call RemoveLocation (udg_Point)

I mean don't use wait for spell that loops or whatever :3
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
Should the Point be Interger too ?
Sentence illogical... Please try again.

For example:
The example does not appear to be valid GUI. I am not sure what it is even meant to be showing.

It does not look MUI because you are using a global to store the location persistently across a wait. If another thread of the trigger was to start then it would overwrite the location.
 
Status
Not open for further replies.
Top