• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Detecting Terrain's Rawcode

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
Well, basicly it requires this code in JASS

JASS:
function terraintype takes location l returns integer
    return GetTerrainTypeBJ(l)
endfunction

However, im not sure exacly how to use it with GUI.

You can try making something like this, im not sure it will work though.

  • Untitled Trigger 001
    • Events
      • Some Event
    • Conditions
    • Actions
      • Custom script: local location l = GetUnitLoc(GetTriggerUnit())
      • Custom script: local integer i = terraintype(l)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Equal to (Integer(Your_Rawcode))
        • Then - Actions
          • Do something
        • Else - Actions
      • Custom script: call RemoveLocation(l)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You will need to put that function I gave you into your map header if you want this to work (and even then im not sure if the GUI code I gave you would work).

The map header is this

attachment.php


Click on that scroll and it will open to text boxes for you, copy that code to the lower part.
 
Status
Not open for further replies.
Top