Prob a dumb question but.

Status
Not open for further replies.
Level 7
Joined
Aug 15, 2012
Messages
318
Making a created hero remove on Load

Hi I use a save/load system NPS or what ever I can link all the triggers but ill show the main problem first.
  • Picking a hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • The Decision Equal to (Unit-type of (Buying unit))
          • (NPS Load <gen> is on) Equal to True
    • Actions
      • Unit - Remove (Buying unit) from the game
      • Unit - Remove (Last created unit) from the game
Essencially what im trying to do is remove the decision when someone loads the character
 
Last edited:

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
I think this is a bad. Why do you need to check if a trigger is enabled? There is literary no point.

All that condition check is if there is a load trigger. You already know that there is a load system in your map so why is there a need to check for it?
Regarding "The Decision" variable, it could cause issues. But I would not know as it's set in another trigger.
 
"Essencially what im trying to do is remove the decision when someone loads the character"

Wouldn't just turning the trigger (that loads the character) off do that?
"The Decision" is probably a unit in his case. But yeah; confusing names he got there. ;)

is it possible to make it read a string player type -load remove x unit also the unit im trying to remove is spawned by triggers and is created for every single player
Still "Last Created Unit" will only refer to the actual last created unit. Hence the name. If you create one unit for every player, you will only be able to access the one that was created for the last player.
You need to store these units in variables.
 
Level 7
Joined
Aug 15, 2012
Messages
318
"The Decision" is probably a unit in his case. But yeah; confusing names he got there. ;)


Still "Last Created Unit" will only refer to the actual last created unit. Hence the name. If you create one unit for every player, you will only be able to access the one that was created for the last player.
You need to store these units in variables.

So say I saved them as picked unit would they all be picked? just using that as an example will prob just do triggering
New trigger still doesnt work

  • Loading a hero
    • Events
      • Player - (Player(1)) types a chat message containing -Load as An exact match
      • Player - (Player(2)) types a chat message containing -Load as An exact match
      • Player - (Player(3)) types a chat message containing -Load as An exact match
      • Player - (Player(4)) types a chat message containing -Load as An exact match
      • Player - (Player(5)) types a chat message containing -Load as An exact match
      • Player - (Player(6)) types a chat message containing -Load as An exact match
      • Player - (Player(7)) types a chat message containing -Load as An exact match
      • Player - (Player(8)) types a chat message containing -Load as An exact match
      • Player - (Player(9)) types a chat message containing -Load as An exact match
      • Player - (Player(10)) types a chat message containing -Load as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The Decision Equal to (Unit-type of (Matching unit))
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Unit - Remove (Matching unit) from the game
            • Else - Actions
              • Unit - Remove (Triggering unit) from the game
My map if anyone wants to take a look.
https://www.epicwar.com/maps/256895/

why do I feel like an outcast here?
 
Last edited:
Status
Not open for further replies.
Top