HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Local Player 2

01-02-2006, 04:32 AM#1
Zandose
Ok, since my first post didn't work as I planed I'll try a different approach. This is from my point of view. I'm having trouble understanding how you would go about changing a trigger from normal (GUI) to only running for the local player. I've tried adding at the start "if GetLocalPlayer() == Player(0) then" but it doesn't seem to help.

Question, if you have a trigger that shows a text message to only one player then does that trigger for all the players or just the person getting the message?
01-02-2006, 10:21 AM#2
Earth-Fury
doing things to the local player can cause diconnects, but heres how ya do it:

if (triggering player) = getlocalplayer() then

now if you want to display text to just one player, then you dont need local player

Code:
Game - Display to Player Group - Player 1 (Red) the text: hi!

doing things to the local player is bad. (this is not always true, but its a good rule of thumb, as doing many actions to the local player can cause problems)
01-02-2006, 10:48 AM#3
Thunder_Eye
anything that changes the pathing for only one player will cause desync.
Like creating units, things like changing transparity and colour of units wont.
01-02-2006, 01:33 PM#4
Earth-Fury
Quote:
Originally Posted by Thunder_Eye
anything that changes the pathing for only one player will cause desync.
Like creating units, things like changing transparity and colour of units wont.

ive had issues wit doing many a tings to the local player that dont change the pathing :) its not just changes to pathign that cause desync, but any pathing change will cause a desync. (i know you didnt say "just", but i thogt ide clear it up for those who are uninformed.)
01-02-2006, 04:35 PM#5
Zandose
I already know what will cause desync and what will not. The thing I don't understand it why that simple line changes the code to local player.