• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!
Chaosy
Reaction score
898

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • I would go with structs for it I think.

    Uhm for this event, it might not work because you immediatly set it to 0 again. I think you must set it to 0 in an other operation thread, so the trigger has a chance to fire.
    Can you show where you save the reals into hash?

    Why this:

    set udg_patrol_event = 1
    set udg_patrol_event = 0

    What does this? set udg_patrolUnit = u

    And just setting to 0 is not really a solution. Imagine two cases.

    1) Patrol point is really 0/0. Would be rarely case, but then it would bug.

    2) You don't remove it from the list, but only change the value. So there won't be any check for following action you do:

    call IssuePointOrder(u, "attack", LoadReal(hash, id, i+1), LoadReal(hash, id, -i-1))

    Got it? xNew and yNew are the coordinates you check for the current waypoint where unit is. You check if they are equal 0.
    Then you order unit to go to the next waypoint, which is not checked anymore. So unit will just go to 0/0.

    In your case, if user want remove waypoint[index] then I think you have to loop from index to maxIndex and move all waypoints down one by one. And in end set maxIndex = maxIndex - 1.

    ____________________

    If you want something some other solution. Maybe there could be a neat solution if there was something like waypointNext and waypointPrev.
    Each waypoint would have one of them, and all would be easy.

    For patrol would be just: Order Unit To move to <WayPointNext>.

    For removing WayPoint[index] would be: Set WayPointNext[index - 1] = WayPointNext[index]
    (so the waypoint before would just link no more to the Waypoint[index] but now to Waypoint[index + 1])

    And it's not a big deal, really. We're here to help each other, right? :D
    Rather hard? hehe, we shall see. It may take huge effort but still can achieve good results. also summer vacation is still on but not that hot now yay :)
    Oh, nope, still not ;/ :cry::cry::cry:

    Well, blame my requests thread and, well umm meh :D

    Edit1: I need a motivational spanking:) Feel free to beat my ass sometimes :p

    Edit2: Speaking of that, I'll remake that grommash icon you requested a while ago. Needs more definition and better quality.
    okay, well, we'll get back to the campaign later I guess.
    Some time off won't hurt.
    In jass locations are rarely really useful, because we can just use the reals instead, which is faster and more flexible.
    There doesn't exist a location in real, or? You work with reals only.

    But if you want to change the concept to rects, maybe it's better first to make the current code rect-compatible and then go further.. else it willbe harder later.
    Why a loop is needed? Check if the id is valid, and if yes you set point[id] = point[id+1], or to point[1] if it was last, or do nothing if it was the only patrol point.
    Yes it would be best method I think. Periodicly checking through all waypoints is not the best.

    I would try with creating rects and then work with TriggerRegisterEnterRegion.
    Yah, just give user much power do modify unit's patrols as easy as possible.

    Maybe a cool feature would be to link a new real to each way point. So this real would define the new movementspeed the unit gets if it reaches it.
    This way the unit could run with different speeds between the points. Though it would be just an addidition, in case the user wants it.
    ah ok than good luck with it! if there is an easy interface it might be useful!

    yeah i/-i is simple to use :D
    Sorry did not see your edit immediatly. ^_^

    Uhm, the storage and loading of location with indices was a bit unreadable (for me), so I decicded to remove it and make it my way. :d

    I'm not sure it was the only issue, but I think the if i2 >= 5 was not cool in your periodic loop.
    Hey, how come that you can sleep all day? I mean you said you are awake at night, don't you get sleepy or something? :O
    I think you have wrong thoughts of me. :D but it's ok, and no I don't take it as offense.

    I think speed is important, but efficiency is usually more important than pure performance, so I'm not a speed freak.^^

    But using "thisytpe" as you mentioned is just nice because you can use it in any struct and you don't have to write the exact name.. it's easier to use inside a struct. :csmile:
    Sorry for not answering yesterday no more.

    If it works fine, it doesn't matter what you use. ^^ I don't want to convince anyone of what I'm doing. :d
    But wrapping all into the struct would look more clean and readable, especially with this seperated globals block and the init function at the moment.
    Basically, in short term it actually means that Senior always considered right regardless of their decision.
    Yah, I think me personaly would do like in my example. It's just copy & paste and modify it to your needs...
    or also muzzel's suggestions seems good to start one timer per instance, and attach data to it.

    Does your code even work correctly? I'm not sure it does.. ^^

    Also you can just create a private static method onInit inside struct instead of the init function

    and globals could be static variables inside struct
    Oh well, it based off from facts and uh.. past personal experience.

    Aye, guess so. Are still playing the official one or just fun around private server? :eek:
    Heh. Fresh inspiration hardly comes if you almost never sleep.

    lol. I see, they even forgot to checklisting wings transparent on the red one. Why should I noticing this anyway. :|
    I feel you, starting a huge project is a mistake in the first place as boredom might coming along the way. I should start giving respect point to people whom sticking on a big project over years and on. :/



    Oh wait, we don't have respect point feature.
    Alright Chaosy, clear enough, and thanks for being correct. :3
    I'll get to it as soon as I'm free. (Today I'm busy, like, a lot)
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top