Malfunctioning trigger

AciD

New Member
Reaction score
1
Okay, so I am remaking an old (never made public) map, and the 1st release is almost done.

The problem is, one of the triggers aren't working perfectly. Not a big deal in some cases, but this trigger is supposed to make one revive.

The wierd thing is, it skips the If trigger that checks if the player has reached a level of... Ah, fuck it, pictures say more than 1000 words anyways:

malfunctioningtriggergf7.png


And no, I haven't tried skipping the IF, but it's pretty obvious the IF is the problem, also I need it.

Thanks in advance for any help received.
 

Mapster

New Member
Reaction score
4
Right click on the top of the code and paste it into the forum next time and use the ->
Code:
 [./code] tags without the .

Use "Owner of (Dying Unit)" Condition

EDIT:
instead of the Variable use
[code]
(Player number of (Owner of (Dying unit))) Equal to 1
[code]

In the Integer condition selections.
 

AciD

New Member
Reaction score
1
Mapster, I think you misunderstood the problem. Also I wanted to use a picture in order to be able to guide everything.

Now, to what you missed:

The if case isn't meant to decide the player, it's meant to:

Check if the player in case (the owner of the dying unit) has evolved, by looking at the integer array Evolved if the integer Evolved for the matching player has been set to 1 (which it gets when the player reaches a certain point).

I'm not saying there's a problem with misreading (Thereby I am not flaming you for this Mapster), but I'd like to ask Baltazhar to stop being an asslicker.

I have a theory though, that the problem was that the array size was set to 1. Currently testing map about that theory.
 

Mapster

New Member
Reaction score
4
So i take it later on, Evolved ends up changing?

Code:
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Dying unit)) slot status) Equal to Is playing
    Actions
        Player - Add 1 to (Owner of (Dying unit)) Current gold
        Player - Set (Owner of (Dying unit)) Current lumber to (((Owner of (Dying unit)) Current lumber) - 1)
        Wait 2.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player number of (Owner of (Dying unit))) Equal to 1
            Then - Actions
                Unit - Create 1 Footman for (Owner of (Dying unit)) at (Center of (Playable map area)) facing Default building facing degrees
            Else - Actions
                Unit - Create 1 Knight for (Owner of (Dying unit)) at (Center of (Playable map area)) facing Default building facing degrees

Just checking but you do know that (Evolved[player number of (owner of dying unit)] is equal to 1) is checking the player's number to be 1 instead of counting a number in the variable?
 

AciD

New Member
Reaction score
1
Okay, so how do I make it check what the integer is for the selected player instead? Cause that's what I am looking for.
 

Mapster

New Member
Reaction score
4
Code:
Evolution Equal to 1

That will check the variable if it's equal to 1, all you have to do is change the variable to the number of the player with:

Code:
Set Evolution = (Player number of (Owner of (Dying unit)))
 

AciD

New Member
Reaction score
1
But, that will make Evolution a number between 1 and 11, and it will make it check if PLAYER RED is the owner of the dying unit.

God's sake, listen:

When a player gets 20 gold, he evolves, and the next time he dies he respawns as an evolved unit. I want the if case to check: "HAS THE OWNER OF THE DYING UNIT EVOLVED OR NOT", I do NOT want to set Evolved to the owner of the dying unit or some other shite.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
You said evolved starts at 0. The If/then/else will only run if Evolved is 1.

and Triggering unit is Dying unit (Just thought i'd let you know)
 

AciD

New Member
Reaction score
1
You said evolved starts at 0. The If/then/else will only run if Evolved is 1.

and Triggering unit is Dying unit (Just thought i'd let you know)

the "then" should not run if Evolved is 0, but so should the "else", right? That's the problem.

Altough, I don't care anymore, I gave every player a trigger of his own, it takes up a few more kilobytes and looks less practical in the trigger editor, but it gives me the effect I want. Thank you for your help anyways, all of you (except that asslicker a few posts above, learn to do somewhat less idiotic posts in the future.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top