• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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...?
 
Level 6
Joined
Jan 6, 2006
Messages
204
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