Scripts / Reversing the angels script - Any advice?

Author
Message
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 12th Sep 2016 13:02
Hey Guys, in my game, I am using the script from smallg - "angels" Thanks for that awesome script. It really helped me building my game and it inspired me!
Now I just had an idea. The enemies get repetitive after a while, so iI figured: Why not reverse their behavior in the middle of the game?

That being said:
They come at you, WHEN you look at them
I think, that would be a good surprise for the player when done right

Now I still don't know much about scripting - I hope you guys are willing to help me in this one.

I will add the script - it's a bit modified.

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Sep 2016 17:58 Edited at: 12th Sep 2016 18:02
what you want to change is this check here
Quote: "if PlayerLooking(e,active_range,player_view_angle) ~= 1 then"

right now it checks if the values are not within that range ( ~= 1 means not equal to 1 ) so for the opposite you just need to reverse the check which is as simple as saying == 1 ( does equal 1 )

there are 2 checks in that but you can actually remove the 2nd one as it's not needed (in either script) as the 2nd is within the first so would still be the same result so the script should look like this - didn't test it but im 99% sure it will work.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 12th Sep 2016 18:28
awesome. Will try this asap. Thank you so much !
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 12th Sep 2016 20:45
yes it works. Thank you smallg

Login to post a reply

Server time is: 2024-12-22 22:12:54
Your offset time is: 2024-12-22 22:12:54