Typing Player kills

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Woah, I need help. again... :D:D:D

Anyways, anybody knows how to make a trigger where a player types a number of kills/rounds/lives etc?

Im guessing something with substrings but I never tried it but now I need it so... yeah :D
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This should do the trick:

  • Untitled Trigger 004
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Untitled Trigger 008 <gen> the event (Player - (Player((Integer A))) types a chat message containing -kills as A substring)
  • Untitled Trigger 008
    • Events
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -kills
    • Actions
      • Set i = (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string))))))
typing

-kills 30

will result in 30 stored in integer i.
 

sentrywiz

S

sentrywiz

This looks really complex... but I'll give it a go and just blindly believe :D
Thanks though!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Why not using "8, 9" or something like that to start from 8?

I'm using 8, length of string, so it does start from 8.

So if one types -kills 1 it will pick the 1. If one types 10 it will pick the 10. If one types 1000 it will pick the 1000.

1, 6, will result in also 30, because Integer can't read string, right ?

What? 1,6 just checks that the string begins with -kills.
 
Status
Not open for further replies.
Top