Setting victory conditions via text message?

HalosNTariff

New Member
Reaction score
13
Hi

I'm making a map where the teams must collect a number of items. I would like to make it so that Player one can choose how many items are needed to win by typing -(number) at the start of the game, with a minimum of -100 and a maximum of -1000.

However I don't want to have to make a trigger for every number between 100 and 1000, how can I make a single (or very few) triggers which would achieve the desired effect?

I was planning to use 'chat message entered' but I can't find a way to set the trigger to work on a range of numbers, only one at a time.

Does anybody know how to do this?
 

iPeez

Hot food far all world wide!
Reaction score
165
Trigger:
  • Set victory 100
    • Events
      • Player - Player 1 (Red) types a chat message containing -100 as An exact match
    • Conditions
    • Actions
      • Set victory_integer_variable = 100
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
        • ....


Also create an autorun trigger which checks if the player (and/or his/her allies have more than (victory_integer_variable) lumber).

For 200, 300, 400, etc create a new trigger and and change the;

Trigger:
  • Set victory 200
    • Events
      • Player - Player 1 (Red) types a chat message containing -200 as An exact match
    • Conditions
    • Actions
      • Set victory_integer_variable = 200
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
      • Trigger - Turn off (Other Set Victory Triggers)
        • ....

and keep going =)
 

Artificial

Without Intelligence
Reaction score
326
Trigger:
  • Chat Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
    • Conditions
      • (Integer((Substring((Entered chat string), 2, (Length of (Entered chat string)))))) Greater than or equal to 100
      • (Integer((Substring((Entered chat string), 2, (Length of (Entered chat string)))))) Less than or equal to 1000
    • Actions
      • Trigger - Turn off (This trigger)
      • Set Items_Needed = (Integer((Substring((Entered chat string), 2, (Length of (Entered chat string))))))
      • -------- And start the game here --------

And then you can use the Items_Needed as the amount of items needed to win (i.e. check if amount of items a team has is equal to Items_Needed when they get a new item).
 

HalosNTariff

New Member
Reaction score
13
Okay, I've set up your trigger but I can't see a way make player win when he has the required amount of items. I used the event 'Player Ones' lumber becomes equal to {-X} but I can't put the variable from the first trigger into this one.

I forgot to mention that getting one item gives you one lumber, does this make it easier?
 

Septimus

New Member
Reaction score
58
just set that every 1 second, check each player to see if they met the requirement or not. If there is, set victory for it.
 
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