[JASS]change unit color

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Post Reply
User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

[JASS]change unit color

Post by eddydu555 »

when i put any of this command under elseif -setcolor, nothing happens when i type it in in but when i put it below -vul, it works as intended...

I cant seem to understand why that's the case, pls enlighten me.

Spoiler:

Code: Select all

elseif SubString(s2s,0,10)=="-setvcolor"then
call SetUnitColor(GetTriggerUnit(),ConvertPlayerColor(6))
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: [JASS]change unit color

Post by haxorico »

Your problem is the "GetTriggerUnit()"
This trigger isn't triggered by a unit. The event is a player chat string.
Notice that none of the previous commands GetTriggerUnit.
User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

Re: [JASS]change unit color

Post by eddydu555 »

I mean what's the difference between putting it below -vul and putting it below -setcolor, what's the key factor that makes it stop working? it's in the same function and everything

EDIT: nvm, it was the thing between -destid blabla endif & -int
Post Reply