HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Transparent Roofs for 1 player

11-15-2005, 05:26 PM#1
9398hrb
I need it so that when a unit enters a region, the roof models become transparent (60%) for the owner of the unit only.
I can't JASS at all and i've read the guides and got the JASS editor

Set UnitVertexColor()
GetLocalPlayer()

I've tried, but its not preciest enouth to work. How do you correctly use these JASS functions to get it working?
11-15-2005, 07:19 PM#2
Zoxc
You can use Custom Script: if GetLocalPlayer() == SomePlayer then

//GUI Actions

Custom Script: endif

or you cound use WE Unlimted, there its a Get Local Player function in GUI.
11-15-2005, 09:44 PM#3
9398hrb
You have to be more specific, I don't have a clue.

Untitled Trigger 001
Events
Unit - A unit enters Rect 000 <gen>
Conditions
(if GetLocalPlayer() == SomePlayer)
Actions
Custom script: //Set UnitVertexColor()
Custom script: endif
11-19-2005, 10:38 AM#4
AnarkiNet
you should probably convert the trigger to custom text...
also, '//' means a comment, so the line that looks like.. 'Custom script: //Set UnitVertexColor()' is not doing anything.
11-19-2005, 11:19 AM#5
Tim.
Ugh..I'll help you out the long way.

Here:

Code:
Roof Removal
    Events
        Unit - A unit enters Building <gen>
    Conditions
    Actions
        Set tempPlayer = (Owner of (Triggering unit))
        Custom script:   if udg_tempPlayer == GetLocalPlayer() then
        Game - Display to (All players) the text: ByBye Mr. Roof!!
        Animation - Change RoofUnit[1]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 60.00% transparency
        Custom script:   endif

Now just make sure the roof unit is set to RoofUnit[1] (That is an ARRAY).