Change skin in multiplayer via triggers

Change skin in multiplayer via triggers

Postby yizhe » 14 May 2020, 16:43

How do i get a player to change his skin in multiplayer via trigger functions?
Meep!
User avatar
yizhe
Android T-01187 [200]
 
Posts: 224
Joined: 5 February 2014, 09:26
Location: Advance level editor

Re: Change skin in multiplayer via triggers

Postby ziomke » 14 May 2020, 16:50

Do you want to change a player's skin at a certain time? You can set the trigger function to "change player's model to 'A' ".


http://plazmaburst2.com/images/professor.png
User avatar
ziomke
Civil Security Lite [100]
 
Posts: 138
Joined: 29 June 2017, 09:37
Location: hell

Re: Change skin in multiplayer via triggers

Postby yizhe » 15 May 2020, 02:05

Rather, i want any player that press the use button to change his skin
Meep!
User avatar
yizhe
Android T-01187 [200]
 
Posts: 224
Joined: 5 February 2014, 09:26
Location: Advance level editor

Re: Change skin in multiplayer via triggers

Postby jeje52 » 15 May 2020, 12:14

yizhe wrote:Rather, i want any player that press the use button to change his skin

To change skin of initiator, you have to get the initiator slot and have different actions depending on what that value is.
In pseudocode:
Spoiler: Show More
Code: Select all
set variable "init" to initiator slot
skip if "init" doesn't equal "0"
   change skin of slot 0
skip if "init" doesn't equal "1"
   change skin of slot 1
etc..

If you want to switch skin of player initiator based on a variable value (say you want to randomize or cycle through them), it would be:
Spoiler: Show More
Code: Select all
variable char = whatever character you want to switch to
set variable "init" to initiator slot
skip if "init" doesn't equal "0"
   execute #slot0.skins
skip if "init" doesn't equal "1"
   execute #slot1.skins
   
trigger #slot0.skins
skip if "char" doesn't equal "0"
   change skin of slot 0 to marine
skip if "char" doesn't equal "1"
   change skin of slot 0 to cs
   
trigger #slot1.skins
skip if "char" doesn't equal "0"
   change skin of slot 1 to marine
skip if "char" doesn't equal "1"
   change skin of slot 1 to cs
User avatar
jeje52
Civil Security Lite [100]
 
Posts: 146
Joined: 13 April 2018, 19:52

Re: Change skin in multiplayer via triggers

Postby yizhe » 16 May 2020, 08:21

Thank you for your help. But I am still lost as i still have no idea as to how 'Set value of
variable 'A' to player-initiator slot' works. Maybe a map with open source to showcase how the trigger works will help?
Meep!
User avatar
yizhe
Android T-01187 [200]
 
Posts: 224
Joined: 5 February 2014, 09:26
Location: Advance level editor

Re: Change skin in multiplayer via triggers

Postby jeje52 » 16 May 2020, 12:02

yizhe wrote:Thank you for your help. But I am still lost as i still have no idea as to how 'Set value of
variable 'A' to player-initiator slot' works. Maybe a map with open source to showcase how the trigger works will help?

If a player presses a button, the player-initiator will be set to their slot. So if a player in slot 0 presses a button, the variable would be 0.
User avatar
jeje52
Civil Security Lite [100]
 
Posts: 146
Joined: 13 April 2018, 19:52

Re: Change skin in multiplayer via triggers

Postby yizhe » 17 May 2020, 09:59

Thank you!
Meep!
User avatar
yizhe
Android T-01187 [200]
 
Posts: 224
Joined: 5 February 2014, 09:26
Location: Advance level editor


Return to Bug Reporting Archive

Who is online

Users browsing this forum: No registered users