Repick

  • Thread starter Thread starter Walker
  • Start date Start date
W

Walker

Guest
What's the easiest way to make a hero repicking system for my AoS game?
 
event:
Player - Player 1 (Red) types a chat message containing -repick as An exact match

action:
Unit - Remove (Random unit from (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) from the game
camera - pan camera to center of <heroPickingRegion>
 
Sorry, but that doesn't help me at all. I already know that, as it's extremely basic. Please see my other post to know what kind of hero picking system I'm using: http://www.thehelper.net/forums/showthread.php?s=&threadid=9702

Whenever a person picks a hero on my game, it deletes the Circle of Power and turns off the trigger, removes the Wisp from the game and creates the hero at a Region.

So how do I make a repicking system out of that?
I need it to re-create the Circle of Power for the hero you had previously chosen, and to give you a new Wisp.
 
All you have to do is put the two together...

add this to the end of what darg told ya.. Create a new "chooser" unit, thats all.

Unit - Create 1 Wisp for (Triggering player) at ((Picked player) start location) facing (Center of (Playable map area))

The only problem you will have? If someone keeps repicking, and your using the "REMOVE" style, then your gonna burn up all the heros... unless you have a lot.

IF thats a problem, then DONT do the remove stuff, and don't turn off the trigger.

If you want the repick, AND restrict the map to 1 of each hero, you will need more extensive code to keep track of which are in use, and which are not.

Best of luck.

Ryoko

EDIT1

Instead of removing the circle of power, hero , etc, maybe theres a way to just show/hide them? I am not sure.

EDIT2

If we could hash out the best way to do it, maybe we could do a super write up on this topic, with code? I'd be happy to whip something up for everyone. However, I use regions instead of player start locations. When I used start locations, I had a nasty bug where 1 wisp (teal) would appear in a totally incorrect spot, even though the start location was in the right place. Now I have 8 small regions, and it works perfect. Most people wouldn't do that though....I think
 
If we could hash out the best way to do it, maybe we could do a super write up on this topic, with code? I'd be happy to whip something up for everyone

It's really strange, the number of people asking about how to do a hero selection system has taken a massive spike in the last month or so, not just here but on other forums too. It's very quickly becoming one of the most FAQ's around these days.
 
So I was right. It's impossible to make the circle of power come back without very long and difficult triggers.

My game has 15 heroes per side, but it's not enough. Sometimes nasty people just keep repicking to use them all up and keep other people from having any heroes to pick! And when that happens, they're stuck with a worthless Wisp and no hero.
 
OKAY

I wrote this for you. Actually, I cut / paste this for you.

This use to be super efficent, with one big trigger to handle unit picks, but for some reason:

if ( Region contains unit(chooser unit) ) equal to true

Does not work all the time, only sometimes... I am not sure why... Maybe thats too general for tiny choosing regions, but oh well.

Test this map.. It does the repick, the circle of power, items, everthing.
 
if ( Region contains unit(chooser unit) ) equal to true

Does not work all the time, only sometimes... I am not sure why... Maybe thats too general for tiny choosing regions, but oh well.

I spent a long time working on this one, but eventually had some luck in figuring out what's going on.

It basically comes down to a 'glitch' in the event triggering system, when the event 'unit enters region' fires, at that instant in time the unit who entered the region is generally not considered by the game to be in the region, sometimes it is, sometimes it isn't. Therefore the 'region contains unit' action will typically return false in this scenario.

The solution is simple - a short wait does the trick, 0.10 or 0.20 seconds is good. What makes it nice and simple is the fact that 'entering unit' is not lost after a wait, and thus you can have this event fire multiple times simultaneously and it is guaranteed that, with a wait at the start of your trigger actions, you will never lose the 'entering unit'.
 
Oh man...

To think I delted that huge frikken trigger, when I could have fixed it? LOL do not say such things! ahhhh!

That was the ONLY way I could find to make my 14 hero regions ARRAYS as well, so it was super 'ficient....one trigger to do a for loop, to find the region, and hash the rest out accordingly...

Oh well. The system I uploaded works wonders. You may want to add that to the snip-its.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.
  • U Uberplayer:
    Thanks for everything!
  • XXXconanXXX XXXconanXXX:
    And we JUST got a new warcraft 3 campaign after 20 years! Bummer lol. Thanks for building and maintaining such an awesome community over the years TheHelper! Forums like these are definitely a relic of their time, and in its heyday it really was the place to be in its niche. Hopefully the discord community stays active!
  • WildTurkey WildTurkey:
    All the best helper
  • WildTurkey WildTurkey:
    Thanks for what you have done for me and my family
  • WildTurkey WildTurkey:
    I wish you all the best and am saddened to say goodbye
  • The Helper The Helper:
    That is fantastic WildTurkey I am so happy to hear that! Bless you and your family!
  • The Helper The Helper:
    and i dont think I am going to close the site it is just likely to change drastically but I am working on something for the interim still fleshing it out. Most of the forums are going to be gone though and the NUON site and Warcraft sites will probably to to different hosts. I might keep the news forum though :)
    +1
  • The Helper The Helper:
    So I paired down the forums to what is going to be in the interim
  • The Helper The Helper:
    I might also just go for one news forum and make it Headline News only all that sub forum stuff was busy work on my part i think :)
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    I know right
    +1
  • Varine Varine:
    It's been great guys, I appreciate you having kept it up for so long! I feel like this has been a big part of my growing up in life, and I do very much appreciate everything that this forum has been able to give to me. So thank you.
    +2
  • Varine Varine:
    If there's bits still around I am willing to bet I will be, but I honestly wouldn't be too upset if some of my teenager posts were to no longer be around. I was a little fucking problem back then
    +1
  • Varine Varine:
    I'm going on a backpacking trip pretty soon. I've been trying to do it for a few years now and it just couldn't happen. I'll be by myself, and I think it'll be really good for me. My pack is already too heavy so I can't bring alcohol, and that might be a benefit to me. Like had that probation and couldn't drink, but it's a bit different when you can't do something voluntarily versus threat of literal imprisonment
    +1
  • Varine Varine:
    The trail is 40 miles altogether, but I'm planning on cutting cross country a bit because I want to camp on top of this mountain. I'm bringing a little telescope, if there's still a place for it I'll post some pictures when I get back!
    +2
  • jonas jonas:
    honestly there's nothing on that trip that would become better by drinking
  • jonas jonas:
    looking forward to those pictures
  • The Helper The Helper:
    Happy Thursday people! I think I have come up with a new direction for the site. One that will never fizzle out because a game is not popular anymore. I think I am going to try to make TheHelper.net a place that helps people with real stuff as much as it did with game technical support back in the day. Stay tuned...
    +3

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top