How can I put a model path into a variable?

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
I want to put a model path (an imported one) into a variable, I tried using the Special Effect variable but it has only the option to store a location of the variable and not a specific special effect. Then I was using the String variable and then setting it to an ability model path, but it doesn't seem to work as when I try to create the special effect on unit or ground nothing appears, can anyone please help ?
 
Level 13
Joined
May 10, 2009
Messages
868
You just need to copy its path exactly as how it's in the import manager.

FFGyyYS.png

  • one
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set string = war3mapImported\EMPBomb.mdx
  • two
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set tpoint = (Center of (Playable map area))
      • Special Effect - Create a special effect at tpoint using string
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_tpoint)
Note that if you set the string variable in a custom script, then you need to put another backslash:

JASS:
local string sfx = "war3mapImported\\EMPBomb.mdx"
 
Status
Not open for further replies.
Top