Scripts / Punish The Coward!

Author
Message
Grooovy!
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location: Delray Beach, FL USA
Posted: 16th Aug 2014 17:15 Edited at: 20th Aug 2014 17:16
Here\'s a simple script I wrote to hurt the player if he gets too near an object.

I\'m using this to set limits on where the player can go (too far up a mountain, leaving the combat zone, etc).



Attach to a dynamic entity. If the player gets within a certain distance from the entity, he/she will begin to lose health at a rate determined in the script (see comments).

This usually discourages players from going any further! The entity is hidden in game play but not in the editor, but use a very low poly model for it anyway.



The script can be attached to multiple entities (thanks to smallg here for how to do this in lua, I\'m a Delphi guy myself!).

These entities can then be placed where you don\'t want the player to go.



I wrote this to get around the fact that if I decrease the climb angle value of the player too low (to stop going over hills, etc), the player then cannot climb stairs and stuff.



Feel free to improve upon it!







Brook's Law ..."adding manpower to a late software project makes it later"

Login to post a reply

Server time is: 2024-05-06 07:43:59
Your offset time is: 2024-05-06 07:43:59