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

[General] Help plz!

Status
Not open for further replies.
Level 8
Joined
May 9, 2010
Messages
266
Hello guys!
I need your help to make system for my map.
System is bounce from walls like in magic football or some another maps.
I have made all triggers, calculate angle, but bounced unit path is not right.
Here is trigger with left wall.

  • some
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set integer = (integer + 1)
      • Set AngleAr[integer] = 160.00
      • Set TempPoint = StandartPoint
      • Set TempPoint2 = (TempPoint offset by 1250.00 towards AngleAr[integer] degrees)
      • Unit - Create 1 man for Player 1 (Red) at TempPoint facing AngleAr[integer] degrees
      • Set LCU[integer] = (Last created unit)
      • Unit - Order LCU[integer] to Move TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Game - Display to (All players) the text: (String((Facing of LCU[integer])))
  • some 2
    • Events
      • Unit - A unit enters zone 000 <gen>
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempPoint2 = (TempPoint offset by 2000.00 towards (180.00 - AngleAr[integer]) degrees)
      • Unit - Order (Triggering unit) to Move TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
The unit bounce totally rightly, but path is not a line.

I have made a screenshot with path of the unit.

HEEEEEEEEEELP PLZZZZ!!!
 

Attachments

  • shit.JPG
    shit.JPG
    194.1 KB · Views: 114
Level 12
Joined
Mar 13, 2012
Messages
1,121
Without seeing more my first guess is because you order the unit to move somewhere. The wc3 pathfinding algorithm is often not a straight line. If you really want a nice projectile system dont use the move order but triggered movement. I believe there are some tutorials on this site.

If you want a definite answer you have to provide the whole map or at least the relevant parts.
 
Level 8
Joined
May 9, 2010
Messages
266
Yes, it rather good idea, i have tried to do this yet and it works
But In my map there is hundreds of those actions, so if trigger will make an action with every unit per 0.04 s it will cause a lags, yes? Soooo, I need another suggestion or improve this =)
 
Status
Not open for further replies.
Top