HOST
Moderator: Cheaters
-
- Shopping Maul USA Creator
- Posts: 1759
- Joined: January 18th, 2007, 11:07 am
- Title: No Comment
- Location: Calgary Canada
- Has thanked: 45 times
- Been thanked: 8 times
Re: HOST
Slap this in your "custom script" area
Put this trigger somewhere a few seconds after map initialization:
you have to make a trigger for every color.
Code: Select all
function GetHost takes nothing returns nothing
local gamecache g = InitGameCache("Map.w3v")
call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
call TriggerSyncStart ()
call SyncStoredInteger ( g, "Map", "Host" )
call TriggerSyncReady ()
set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
call FlushGameCache( g )
set g = null
endfunction
Code: Select all
Unit - Change ownership of Tower <gen> to Host and Change color
Code: Select all
Kick Red
Events
Player - (Owner of tower <gen>) types a chat message containing -kick red as An exact match
Conditions
(Triggering player) Equal to Host
Actions
Game - Defeat Player 1 (Red) with the message: You have been kicke...
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + |cffcc0000 has been kicked.|r)
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: HOST
Vegas is away for the holidays. Anyways i think that Tower <gen> Is a unit he made to place down as a place mat for the trigger. Just make a new unit. Make it a building..probably just a scout tower. Remove the placement it has, and the model file. Give it the ability "Locust" and name it Tower, or whatever you wish and place it somewhere in your map off to the side.
Then for the trigger make it something like this..
For unit, click "Select a Unit" and click on your unit that you just made..
Note : Player 1 (Red) is just for example use. That should be changed to the Variable "Host" as he has it.
PS : You can combine Vegas's triggers with Tobias's so you dont have to make an trigger for each player to kick them. Just make Vegas's Script, then the Tower, and then Tobias's trigger, but to work with Vegas's, just a few modifications.
Something like this perhaps? ;x
Then for the trigger make it something like this..
Code: Select all
Untitled Trigger 002
Events
Time - Elapsed game time is 0.30 seconds
Conditions
Actions
Unit - Change ownership of Unit to Player 1 (Red) and Change color
Note : Player 1 (Red) is just for example use. That should be changed to the Variable "Host" as he has it.
PS : You can combine Vegas's triggers with Tobias's so you dont have to make an trigger for each player to kick them. Just make Vegas's Script, then the Tower, and then Tobias's trigger, but to work with Vegas's, just a few modifications.
Code: Select all
Events
Player - (Owner of Tower <gen>) types a chat message containing -kick as A substring
Conditions
(Substring((Entered chat string), 1, 5)) Equal to -kick
(Triggering player) Equal to Host
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to blue
Then - Actions
Game - Defeat Player 2 (Blue) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to teal
Then - Actions
Game - Defeat Player 3 (Teal) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to purple
Then - Actions
Game - Defeat Player 4 (Purple) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to yellow
Then - Actions
Game - Defeat Player 5 (Yellow) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to orange
Then - Actions
Game - Defeat Player 6 (Orange) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to green
Then - Actions
Game - Defeat Player 7 (Green) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to pink
Then - Actions
Game - Defeat Player 8 (Pink) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to gray
Then - Actions
Game - Defeat Player 9 (Gray) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to grey
Then - Actions
Game - Defeat Player 9 (Gray) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to light blue
Then - Actions
Game - Defeat Player 10 (Light Blue) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to lb
Then - Actions
Game - Defeat Player 10 (Light Blue) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to dg
Then - Actions
Game - Defeat Player 11 (Dark Green) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to dark green
Then - Actions
Game - Defeat Player 11 (Dark Green) with the message: (You've Been Booted...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to brown
Then - Actions
Game - Defeat Player 12 (Brown) with the message: (You've Been Booted...
Else - Actions
Something like this perhaps? ;x
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: HOST
It may just be because of some missing parts with his trigger...at least in the code shown..try something like this.. Of course, you will have to copy the action for every other player..but i just tested it and it seems to work..
Code: Select all
Untitled Trigger 002
Events
Player - (Owner of Tower <gen>) types a chat message containing -kick as A substring
Conditions
(Substring((Entered chat string), 1, 5)) Equal to -kick
(Triggering Player) Equal to Host
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 20)) Equal to blue
Then - Actions
Game - Defeat Player 2 (Blue) with the message: Defeat!
Else - Actions
Do nothing
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: HOST
Lol..alright ill break it down for you then. Starting with the Event..
Thats it for the event. Now for the condition.
Now your actions.
Now to make it for every player. Just copy the Actions and change the colors to work with each player along with the text. For Dark Green and Light Blue, Make two of them, One should say dark green, the other dg..the same goes for light blue. It just simplifies it since some dont prefer to type it all out.
If you still dont get what it is..post your problem down..cause im pretty sure i explained it as simple as possible...
Spoiler:
Spoiler:
Spoiler:
If you still dont get what it is..post your problem down..cause im pretty sure i explained it as simple as possible...