• 🏆 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!

Orbiting Trigger

Status
Not open for further replies.
Hi, I need help with an orbiting trigger. Here's what I have:

I have 5 different locusted dummy units that orbit a tree-like structure (Come to think of it, I should just make it 1 unit with different flight heights... moving on). When the building finishes construction, the units appear and begin to orbit it - they do that until the structure is destroyed.

Now the problem is, I need that to be multi-instanceable because it's a structure in an altered melee and there should be able to have several of these trees on the map without the triggers fracking up. I managed to make something in GUI, but I suspect it's leaking like a the oil spill and I think it would be better if I redo it completely.

If your willing to help (please do! :p ), try to give me something in GUI because I don't understand JASS. My brain isn't wired for programming (believe me, I tried). This said, I might be able to understand it if you explained the sections I'd have to alter, and from what I've gathered, people here adore JASS and despise GUI. So if you know of a library here that's useful for what I'm looking for, link me plz. I've tried searching but I havn't found anything.

:)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ahh, I just finished a quite simple system (you know, dummies circling around a constructed structure).
If the structure dies, the flying things should also disappear (did not test this yet, my apologies).

I prefer JASS, but if you want GUI, then GUI it is :D
Uses hashtables, so people who are allergic to those should stay out >__>

Map attached.

Edit: updated map (different speed, fixed slight bug).
 

Attachments

  • CircleTrees.w3x
    10.2 KB · Views: 68
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
^Almost the same as mine except you keyed the building for each object, I keyed the objects for the building. Doesn't really matter in this case :)

In my trigger the spacing of the units in the circle is automatically calculated based on the number of objects.

A small fix is needed here :)
  • Set CircleLoc2 = (CircleLoc2 offset by CircleOffset towards 0.00 degrees)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
^Almost the same as mine except you keyed the building for each object, I keyed the objects for the building. Doesn't really matter in this case :)

In my trigger the spacing of the units in the circle is automatically calculated based on the number of objects.

A small fix is needed here :)
  • Set CircleLoc2 = (CircleLoc2 offset by CircleOffset towards 0.00 degrees)
Yeah, sorry about that - I was already creating it when you posted and didn't want my effort to go to waste :mad:
Auto-spacing is good, but sometimes I just prefer to set things manually ^^

Hehh, you're right about that Loc-thing, should be CircleLoc1 offset [...] of course! Thanks for pointing that out :)
 
Right, I have a question: I'm trying to implement ap0calypse's system (because it looks slightly simpler... my laziness ftw) and I forgot to mention that the units that orbit my structure move at different rates. Do I need 5 different CircleReal (as array variables maybe?) to store each value? Forgive the noob question, I never used Hastables before :(
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ahh, you need to store their speed nside the hashtable then ^^
I've updated my previous post (and updated the map of course).

I gave you 2 possibilities:
- A fixed (mathematical) speed, like: first speed = 4, second speed = 5, third speed = 6, ... (3 + X).
- A random speed (between 2 and 8, you can change that).

You should only use one of these possibilities, obviously :p

Edit: Maker beat me again :D
What he said is actually almost exactly what I did.
 
Status
Not open for further replies.
Top