• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Circle of Beast - Need help with "moving"

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Circle of Beast
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • -------- Boss Changes --------
      • Unit - Move Warlord of Icecrone 0001 <gen> instantly to (Center of Main Area <gen>)
      • Unit - Pause Warlord of Icecrone 0001 <gen>
      • Unit - Make Warlord of Icecrone 0001 <gen> Invulnerable
      • Unit - Make Warlord of Icecrone 0001 <gen> face 270.00 over 0.00 seconds
      • Unit - Turn collision for Warlord of Icecrone 0001 <gen> Off
      • -------- Create the Beasts --------
      • Set TempPoint2 = (Position of Warlord of Icecrone 0001 <gen>)
      • For each (Integer A) from 1 to 72, do (Actions)
        • Loop - Actions
          • Set TempArray[(Integer A)] = (TempPoint2 offset by 2000.00 towards (5.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Dummy Frost Circle for (Owner of Warlord of Icecrone 0001 <gen>) at TempArray[(Integer A)] facing (Position of Warlord of Icecrone 0001 <gen>)
          • Unit - Add a 18.00 second Generic expiration timer to (Last created unit)
          • -------- Move the Beasts --------
          • Unit - Order (Last created unit) to Move To ((Position of (Last created unit)) offset by 4000.00 towards (Facing of (Last created unit)) degrees)
      • -------- Boss changes (2) --------
      • Wait 18.00 game-time seconds
      • Unit - Unpause Warlord of Icecrone 0001 <gen>
      • Unit - Make Warlord of Icecrone 0001 <gen> Vulnerable
      • Unit - Turn collision for Warlord of Icecrone 0001 <gen> On
What does this trigger should do?
- Creates beasts around the Warlord ( in range of 2000 ). Now each beast should move to the opposite side of the created beast... ( I don't know other words how to explain it, but maybe you know if you look at the trigger.

What is the problem?
- The Beasts are created in a circle.
- The Beasts start to walk but not directly the "directly way". Some move a bit right or left. But I need them to walk only forward to the other position. How I do that?
- After the moving ( 4000 ) there all are back in a perfect circle
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
(1 leak left: the facing position of warlord, but I guess you're going to remove leaks later on ^^)

You will need some kind of movement (missile) system.
This problems occurs a lot, it's the warcraft movement system that does this (the units move roughly to the pointed direction, but they don't walk a straight line).
With a missile system, they will go along a precise line.

Erm... I'll save you some time, here it is (~Attached)
It's the spell "Circle" (don't mind the other spell, it's a demo-map for a system that I was working on for a few special effects, the system itself is probably never going to be released anyway, I'll probably just dump it like all other things I create xD).

(wow, that actually looks quite amazing... perhaps I'll use that as a special effect some day O_O).
 

Attachments

  • MissileSystem.w3x
    22.5 KB · Views: 75
Level 28
Joined
Jan 26, 2007
Messages
4,789
Seas =)

Ahh ok I looked at but ... wth if I use a spell I get a bloody total lag .... normal?
Perhaps because of the huge SFX amount? (which spell did you cast?)
There are no leaks, if that's what you are trying to say (and my FPS drops from 64-65 to 63, but it goes back to 64-65 when it's done, a 2 FPS drop for a short while wasn't really worrying me :S).
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Both skills - I reduce the missile amount and the arrow spell is ok. But the circle I reduce the missile amount to 25 but still got some lags. I see some blue effects comes from on side - lag - lag - then there are the caster - lag - and then they move away ( laggy )

Hmm normally i got 60 - 61 - 62 - 63 fps to but this spell take them down to 1 - 3 ^^

[ My Computer isn't a high stuff - but I can play "today release games" with high graphic quality so this can't be the reason ]
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Seas =)

Both skills - I reduce the missile amount and the arrow spell is ok. But the circle I reduce the missile amount to 25 but still got some lags. I see some blue effects comes from on side - lag - lag - then there are the caster - lag - and then they move away ( laggy )

Hmm normally i got 60 - 61 - 62 - 63 fps to but this spell take them down to 1 - 3 ^^

[ My Computer isn't a high stuff - but I can play "today release games" with high graphic quality so this can't be the reason ]

Try changing the model of the missile (the water missile is quite heavy I think, try using the arrow dummy first - I've added a few dummy models to choose from, but you can create your own of course ^^).
Not sure if the above will help, but when comparing the wave with an arrow, the arrow looks easier to process in the warcraft engine xD
On my PC, the FPS doesn't drop at all when casting the spell with 45 missiles and the water wave model.

(On a side-note: I still had 5 FPS left when massing the spell with 45 missiles O_O)

Edit: well, the lag spike seems to appear from the moment they all reach the same point (since all the missiles reach the exact same point at the exact same moment), don't know if you can do anything about that...
Ohh, btw: you can try removiing all useless if/then/else-function in the actual missile system ^^
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Even if I change the missile to "None.mdl" I got lags.
- 0.25 seconds after I click the icon
- at the full missile way

I don't know whats going on there - I try to use JNGP, I tested it with the normal Editor. Maybe some changes there but I don't know ^^ <-- EDIT: No - still lags T_T
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Seas =)

Even if I change the missile to "None.mdl" I got lags.
- 0.25 seconds after I click the icon
- at the full missile way

I don't know whats going on there - I try to use JNGP, I tested it with the normal Editor. Maybe some changes there but I don't know ^^ <-- EDIT: No - still lags T_T
I'll make you a completely new system from scratch by tomorrow (I hope I can remember it :p).
I'll do my best avoiding all useless stuff and increasing the efficiency to the max (without using JASS).

That should solve it xD
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Double Post: (yes, I am aware of this, this is quite an important post though).

I don't think it's possible to make it even more efficient than this... (I even used an integer variable instead of "Picked Unit" / "Last Created Unit" for the hashtable).
I couldn't detect any form of lag with the 72 missiles, I hope you don't either xD

Have fun and tell me if anything is wrong.
 

Attachments

  • MissileRequest.w3x
    15.5 KB · Views: 51
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Ok I will think I will use this what you was talking about by other spells - this very helpful <-- Thanks for helping :wsmile:

( Sorry that this comes so late - I forget this post ^^ but know it's time for:

+rep to MortAr- <-- helping with "a preload trigger"

+rep to ap0calypse <-- for the double post :wwink: .. no joke <-- thanks for the first missile system, for the improved missile system, and so on :wsmile:
 
Status
Not open for further replies.
Top