A camouflage spell help.

Ryan-Ing

New Member
Reaction score
2
http://www.thehelper.net/forums/showthread.php?t=67431&highlight=reptile
is a camouflage spell made by Exide. one of the triggers called meld was made in jass. can anyone help me turn it into gui? i still dont understand jass yet. also for the gui version of camouflage in the map, certain colours are already set. can anyone figure out how the colours are set and how to use different colours than the ones already set? thanks alot +rep to anyone that can help.
 

NullCurrent

( ゚ε ゚)
Reaction score
110
I got it Ryan-Ing, its simple but it is going to be a long code if you use many terrain types.

The colors of the unit is not very good, but it will do, you can change it later.

Heres the code:
Code:
Camo
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
            Loop - Actions
                Set Terrain = (Terrain type at (Position of (Picked unit)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Terrain Equal to Lordaeron Summer - Dirt
                    Then - Actions
                        Animation - Change (Picked unit)'s vertex coloring to (50.00%, 18.00%, 1.00%) with 0.00% transparency
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Terrain Equal to Lordaeron Summer - Dark Grass
                            Then - Actions
                                Animation - Change (Picked unit)'s vertex coloring to (2.00%, 100.00%, 2.00%) with 0.00% transparency
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Terrain Equal to Lordaeron Summer - Rock
                                    Then - Actions
                                        Animation - Change (Picked unit)'s vertex coloring to (62.00%, 61.00%, 63.00%) with 0.00% transparency
                                    Else - Actions

Ill post the map i made also.

Have fun!

EDIT: to set the colors its the "set unit vertex color"
and to set diefferent colors make a new If/Than/Else with the terrain you want.
 

Ryan-Ing

New Member
Reaction score
2
thanks a lot. can u also tell me how to get a specific colour? also if u can, can u make the meld trigger from the original map from jass to gui? thanks soo much + rep.


The Meld Code is this.

function Trig_Meld_Actions takes nothing returns nothing
local location loc = GetUnitLoc(udg_CamoUnit)
local location temp
call TriggerSleepAction( 0.50 )
set temp = GetUnitLoc(udg_CamoUnit)
if ( ( DistanceBetweenPoints(loc, temp) >= 1.00 ) ) then
call UnitRemoveAbility( udg_CamoUnit, 'A00C' )
else
call UnitAddAbility( udg_CamoUnit, 'A00C' )
endif
call RemoveLocation(loc)
call RemoveLocation(temp)
set loc = null
set temp = null
endfunction

//===========================================================================
function InitTrig_Meld takes nothing returns nothing
set gg_trg_Meld = CreateTrigger( )
call DisableTrigger( gg_trg_Meld )
call TriggerRegisterTimerEventPeriodic( gg_trg_Meld, 1.00 )
call TriggerAddAction( gg_trg_Meld, function Trig_Meld_Actions )
endfunction
 

rax_7

New Member
Reaction score
1
by the way, in case you miss this. for the best result, it's a good idea to make the unit shows on minimap=false. otherwise, whats the point of camo when a player can find it on the minimap(especially for hero, the dot is so visible on the minimap)? (AI can always see it anyway)
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
@Ryan-Ing:
The code you posted can barely be transformed into GUI. There are local variables in use with would require the GUI code to use alot of custom scripts. It would look like this:

Code:
Meld
    Events
    Conditions
    Actions
        Custom script: local location loc = GetUnitLoc(udg_CamoUnit)
        Custom script: local location temp
        Wait 0.50 seconds
        Custom script: set temp = GetUnitLoc(udg_CamoUnit)
        ....
I suggest you just import that JASS trigger as it is. Make a new trigger, call it "Meld", then click on Edit -> Convert to Custom Text, and past the whole code into that (overwrite the existing code).
 

NullCurrent

( ゚ε ゚)
Reaction score
110
Could you just tell me what it does?
I never look at the triggers, I just figure out what it does and make a totally different trigger.
I don't know much about Jass(im learning at the moment):)

EDIT: to get a specific color, your going to have to play with the colors a little. Or you might be able to find a color code system.
 

Somatic

You can change this now in User CP.
Reaction score
84
That Ability is a Trigger which checks the location of the current unit, and then if the units moves (From the "if ( ( DistanceBetweenPoints(loc, temp) >= 1.00 ) ) then") It will remove the "Meld" away from the unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top