• 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.

Flashlight effect...

Status
Not open for further replies.
Level 6
Joined
May 1, 2009
Messages
156
I should ask Sawyer, who made the tutorial with the spell but....
Im not good with spells but i'm using the flashlight effect that only lights up the area you're looking toward and its done by a dummy unit that has locust ability and a Light model that is always offset of 300 from where your facing with the custom script that blackens out everything except torches and lanterns, etc.

Im wondering if there's a way so when you walk towards say a thin wall, it won't jump to the other side of the wall. I'm just wondering if there's a way too...?
 
Well ... probably you can do this by checking the cliff level in front of your character. If the cliff level is higher than the cliff level your unit is standing on, move the the pointer(light) to the cliff level. You need to create a period loop and check linear collision for cliff levels. Other idea: move a hidden item linear towards the facing of your character and check the pathing. If it returns (compare linear x/y coordinates with GetItemX/Y coordinates) false in the line you know that there's an obstacle in the path. Then alternatively check if the collision source is a unit/destructable/etc. If it is a unit and no structure simply ignore the false boolean and move your flashlight to the destination coordinates.

Could be a working solution.. you'd need to test it.
 
Level 6
Joined
May 1, 2009
Messages
156
Awsome I understood it, I can't really do it because I'm not good with GUI but.... I'll try when I'm really bored lol, thanks for reply.
 
Status
Not open for further replies.
Top