• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Small Request

Status
Not open for further replies.
Level 8
Joined
Nov 29, 2008
Messages
462
Hello there.
I´m currently going to finish my ORPG Dungeon Gods.

I´ve got a save system, but i need a trigger.

This:
Only 1 Player playing (CPU players don´t count)
-> Disable Trigger

More than 1 Player playing (CPU players don´t count)
->Enable Trigger

Anyway, i only need one of these 2 triggers.
Please help, i know it might be easy but i cannot do it :p
 
Level 11
Joined
Dec 8, 2006
Messages
334
Something like this:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Player 1 (Red) controller) Equal to User
    • Then - Actions
      • Set Integer = (Integer + 1)
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Player 2 (Blue) controller) Equal to User
    • Then - Actions
      • Set Integer = (Integer + 1)
    • Else - Actions
Do this all the way to player 12 or idk how many players u have

End it with this:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Integer Greater than 1
    • Then - Actions
      • Do stuff
    • Else - Actions
      • Do other stuff
 
Level 12
Joined
Aug 22, 2008
Messages
911
Offer a much more simple and leakless solution, I do:
  • Events
  • Conditions
  • Actions
    • Set PlayerGroup = (All players controlled by a user player)
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Number of players in PlayerGroup equal) to 1)
      • Then - Actions
        • Trigger - Disable Trigger
      • Else - Actions
        • Trigger - Enable Trigger
    • Custom script: call DestroyForce(udg_PlayerGroup)
 
Level 8
Joined
Nov 29, 2008
Messages
462
@idodik: This is the trigger i already had. It didn´t work. (If i play single, it shows me Multiplayer, if iam with another one, it shows me Singleplayer :S)
 
Level 12
Joined
Dec 10, 2008
Messages
850
You could use a loop to a=make it smaller. Using the same principale, and an if/then/elese, create a loop, and set it from 1 to 12. Loop through it, and check if Player (Integer A or whatever you prefer) Is Playing equal to true then set Integer Blah = Blah +1. Else

  • Blah
  • Events
  • Conditions
  • Actions
  • <Your actions
  • For each (Integer A) 1 to 12 do
    • If - Conditions
      • Player (Integer A) Is Playing equal to True
    • then - Actions
      • Set Blah = Blah + 1
    • else - Actions
  • If - Conditon
    • Blah is greater then 1
  • Then - Actions
    • Trigger - Enable Save Trigger
  • Else - Actions
    • Trigger - Disable Save Trigger
Edit: Just after you posted. Darn
 
Status
Not open for further replies.
Top