How to kill a chooser after already choosing with a different command.

aussj4link

New Member
Reaction score
3
ok check this out, in this map there is a hero choosing system that uses a wisp to enter a circle with a hero on it and it will basically create that hero for them and kill the wisp, i wanted to make some special "secret", if u will, heros that could be chosen by typing a chat message, it works but i also want that if you use the chat message it will kill the wisp so that they cant hav 2 hero's ya know, i dont know how to put it in the little window thing you guys put it in so i just copied and pasted text, heres the trigger:


Bebi
Events
Player - Player 1 (Red) types a chat message containing got milk as An exact match
Conditions
((Name of (Triggering player)) Equal to aussj4link) or ((Name of (Triggering player)) Equal to tugboatcapt)
Actions
Camera - Pan camera for Player 1 (Red) to (Center of EndTeam1 <gen>) over 2.00 seconds
Unit - Create 1 Bebi (Evil) for Player 1 (Red) at (Center of EndTeam1 <gen>) facing Default building facing degrees

Ok, what i was thinking was that in the conditions the wisp wud hav to be alive, and in the actions he wud die when the message is typed. but there is no condition like that, or maybe i missed it somwhere, if so please direct me lol. any help at all on this would be greatly appeciated. thx
 

aussj4link

New Member
Reaction score
3
omg... r u serious, i thought that was for checking what kinda unit it was not if its alive... jeez.... i am such an idiot, thank you tho lol.
 

aussj4link

New Member
Reaction score
3
ok wud this b right? it creates the wisp after difficulty has been chosen, so i cant pick the exact unit so im hoping that it would b the last creted unit:

Bebi
Events
Player - Player 1 (Red) types a chat message containing got milk as An exact match
Conditions
True Equal to ((Last created unit) is alive)
((Name of (Triggering player)) Equal to aussj4link) or ((Name of (Triggering player)) Equal to tugboatcapt)
Actions
Unit - Kill (Last created unit)
Camera - Pan camera for Player 1 (Red) to (Center of EndTeam1 <gen>) over 2.00 seconds
Unit - Create 1 Bebi (Evil) for Player 1 (Red) at (Center of EndTeam1 <gen>) facing Default building facing degrees
 

aussj4link

New Member
Reaction score
3
yes just one, but its created after difficulty has been chosen by red, then they move the wisp into the circle of the hero they want, but in this case, the hero is made by typing a message, so i need it to destroy that wisp if they type the message.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> True Equal to ((Last created unit) is alive)

This will sometime be True for no reason because some other unit you created previously will be alive.

When you create the wisps, store them into a unit array variable, 1 being the wisp of player1, 2 being the wisp of player 2... etc. Store them as Last Created Unit each time.

Then check if the unit array (player 1? let's use player1's) is alive.

Something like
Create 1 wisp for Player 1 (Red) at blablabla...
Set Wisp[1] = (Last Created Unit)

**later**

in the above trigger's Conditions, do that :
(Wisp[1] is Alive) Equal to True

blablabla

If you need help because I'm not clear say it now I'll write the trigger.
 

ragingspeedhorn

Is a Banned Asshole
Reaction score
94
So instead of last created unit have unit of type owned by player.

So it picks any units of type wisps owned by whatever player you want and removes it.
 

Sim

Forum Administrator
Staff member
Reaction score
534
There are no such functions in Conditions. You cannot look if the unit is owned by the player. That's why I suggested the unit array variable.

Look, I'll write the trigger hold on.
 

aussj4link

New Member
Reaction score
3
lol i like ragingspeed's fix better lol, malto's sounds alot more complicated lol. hmmm, i hate to make you do more than u need by cud u make that code real fast please?
 

Sim

Forum Administrator
Staff member
Reaction score
534
I understand what you mean for ragingspeed's thingy but here look at mine.

Code:
SetWisps
    Events
    The_Events_Corresponding_With_Your_Difficulty_Choosing
    Conditions
    Whatever
    Actions
        Create 1 <UNIT> for Player1
        Set UNITEXEMPLE[1] = (Last created unit)
        Create 1 <UNIT> for Player1
        Set UNITEXEMPLE[2] = (Last created unit)
        Repeat between each UNITEXEMPLE
        Set UNITEXEMPLE[3] = (Last created unit)
        Set UNITEXEMPLE[4] = (Last created unit)
        Set UNITEXEMPLE[5] = (Last created unit)
        Set UNITEXEMPLE[6] = (Last created unit)
        Set UNITEXEMPLE[7] = (Last created unit)
        Set UNITEXEMPLE[8] = (Last created unit)
        Set UNITEXEMPLE[9] = (Last created unit)
        Set UNITEXEMPLE[10] = (Last created unit)
        Set UNITEXEMPLE[11] = (Last created unit)
        Set UNITEXEMPLE[12] = (Last created unit)

Above trigger is for if you need more than 1 player...

Code:
WispRemoveChat
    Events
        Player - Player 1 (Red) types a chat message containing got milk as An exact match
    Conditions
        ((Name of (Triggering player)) Equal to his_name) or ((Name of (Triggering player)) Equal to Other_Name)
        (UNITEXEMPLE[(Player number of (Triggering player))] is alive) Equal to True
    Actions
        THE_ACTIONS_YOU_WISH

As I told you, if you don't need more than 1 player replace UNITEXEMPLE with a normal unit variable with no array and just look if that variable is ok (in WispRemoveChat trigger) and set it once to (Last Created Unit) in SetWisp trigger.
 

aussj4link

New Member
Reaction score
3
awesome, thank you so much malto. i will put that in and see if it works heh. oh, theres 8 players, 4 teams 2 per team, so i shud b able to figure out how to make em for all that.
 

ragingspeedhorn

Is a Banned Asshole
Reaction score
94
Nice trigger work Malto, I admit your suggestion kinda owned mine (I just made it out of the top of my head, you really did some work) :)
 

Sim

Forum Administrator
Staff member
Reaction score
534
here's the trigger fully remade for it to work perfectly (well, untested but it should)

Replace (Center of (Playable map area)) with your region...

Code:
SetWisps
    Events
        Your_Events! What you could do if it's another trigger (I'm taling about the difficulty choosing one), you could Run it using "Trigger - Run SetWisps <gen>"
    Conditions
        Whatever
    Actions
        Unit - Create 1 Wisp for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[1] = (Last created unit)
        Unit - Create 1 Wisp for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[2] = (Last created unit)
        Unit - Create 1 Wisp for Player 3 (Teal) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[3] = (Last created unit)
        Unit - Create 1 Wisp for Player 4 (Purple) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[4] = (Last created unit)
        Unit - Create 1 Wisp for Player 5 (Yellow) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[5] = (Last created unit)
        Unit - Create 1 Wisp for Player 6 (Orange) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[6] = (Last created unit)
        Unit - Create 1 Wisp for Player 7 (Green) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[7] = (Last created unit)
        Unit - Create 1 Wisp for Player 8 (Pink) at (Center of (Playable map area)) facing Default building facing degrees
        Set UNITEXEMPLE[8] = (Last created unit)

And the second one...

Code:
CheatedHero
    Events
        Player - Player 1 (Red) types a chat message containing got milk as An exact match
        Player - Player 2 (Blue) types a chat message containing got milk as An exact match
        Player - Player 3 (Teal) types a chat message containing got milk as An exact match
        Player - Player 4 (Purple) types a chat message containing got milk as An exact match
        Player - Player 5 (Yellow) types a chat message containing got milk as An exact match
        Player - Player 6 (Orange) types a chat message containing got milk as An exact match
        Player - Player 7 (Green) types a chat message containing got milk as An exact match
        Player - Player 8 (Pink) types a chat message containing got milk as An exact match
    Conditions
        ((Name of (Triggering player)) Equal to his_name) or ((Name of (Triggering player)) Equal to Other_Name)
        (UNITEXEMPLE[(Player number of (Triggering player))] is alive) Equal to True
    Actions
        THE_ACTIONS !! (l33t)

Here, this should work.
 

aussj4link

New Member
Reaction score
3
jut 2 questions atm, wisps r already being created, so wouldn't this make 2 wisps? and by "UNITEXAMPLE" what exactly do u mean by that? cuz if itsa trigger i cant find it, whats it under.

-Edit: o wait nevermind, i found it, under set variable and then edit variables right? o and what variable type is it?
 

Sim

Forum Administrator
Staff member
Reaction score
534
not edit, Create new variable. Unit variable and check array, set its size to 8.

> jut 2 questions atm, wisps r already being created, so wouldn't this make 2
> wisps? and by "UNITEXAMPLE" what exactly do u mean by that? cuz if itsa
> trigger i cant find it, whats it under.

Well just add, AFTER EACH WISP CREATION, Set UNITEXAMPLE[1] = (Last Created Unit)

and change the 1 to 2, then to 3, then to 4, then to 5 after each wisp creation.
 

aussj4link

New Member
Reaction score
3
will it effect anything if players 4,9,11, and 12 are computers? should the numbers after UNITEXEMPLE be that of the players number? lol if this sounds dumb its because im not sure exactly what all this means.
 

aussj4link

New Member
Reaction score
3
lol I'm actually editing an abondoned map, trying to make it cool again, doin alot of stuff to it really, but im still giving all credit to the original creator, but I'm a noob when it comes to map building, so a friend told me a should take an old map and edit it and play with it a bunch to get better with the editor, so i decided to take this map and add-on a whole buncha stuff im hopes ill learn everything i need to make my own map from scratch.
 

Sim

Forum Administrator
Staff member
Reaction score
534
yea numbers between [ ] are player numbers. Just remove the 4th one.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top