Text-based Alliance and Name Changes

The Arcot

New Member
Reaction score
7
Ive been fiddling around with this for a while, and I am having difficulty finding any answers through he search function, so I though I would make my own thread. Anyway, thats beside the point...

I want to recreate the command system that lets players change their names and alliances through typed commands (e.g. "-ally red", "-name Awesome-o 5000").

Now, It's probably not that complicated, but I'm dumb so I can't quite figure out what the event would be. If somebody could show me the trigger from an already existing system (or a link to a tutorial for such a system) it would be much appreciated.
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
Trigger

Code:
Events
        Player - Player 1 (Red) types a chat message containing -name as A substring
    Conditions
    Actions
        Player - Set name of Player 1 (Red) to (Substring((Entered chat string), 7, 20))

that works for the name change
 

The Arcot

New Member
Reaction score
7
Awesome, thanks a bunch! What would it be for team alliances? Its would be a bit more specific, wouldn't it?

I tried making an exact string (like a player enters "-ally Red" as an exact match) then set the entering player to ally red, but it didn't work. Maybe I messed something up.
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
Code:
Untitled Trigger 003
    Events
        Player - Player 1 (Red) types a chat message containing -ally as A substring
    Conditions
    Actions
        Player - For Player 1 (Red), turn Alliance (non-aggression) On toward (Player((Integer((Substring((Entered chat string), 6, 9))))))

that should work
also enter the players number
like 1 2 3 9 10 11

NOTE: im not positive it will work
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
well i dont know what to tell you but
1. you may have entered it wrong
2. or you can do it like this

Code:
Trigger 
    Events
        Player - Player 1 (Red) types a chat message containing -ally blue as An exact match
    Conditions
    Actions
        Player - For Player 1 (Red), turn Alliance (non-aggression) On toward Player 2 (Blue)
 

The Arcot

New Member
Reaction score
7
Gasp, I suppose. Is there a way to make it so the event is that if any player types that, they get allied to the inserted player?

Otherwise I would have to make 121 different triggers.
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
Gasp, I suppose. Is there a way to make it so the event is that if any player types that, they get allied to the inserted player?

Otherwise I would have to make 121 different triggers.

yeah i dont know a better solution
at the moment
 

Frozenwind

System maker
Reaction score
99
In map initation:
set string_var[1] = "Red"
set string_var[2] = "Blue"
set string_var[3] = "Teal"
etc.

Code:
E: Player - Player 1 (Red) types a chat message containing "-ally " as a substring
---- list all players here ----
C: substring 1,6 is equal to "-ally "
A:
For each integer A from 1 to 12 to actions:
    if (substring string_var[IntegerA] 1,4) is equal to (substring enterered chatstring 7,10)
        then
        Player - For Triggering Player, turn Alliance (non-aggression) On toward (Player(Integer(Integer A)))

That might help a lot...

frozenwind.
 
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