Scripts / Stepping on floor hurts player script?

Author
Message
Dralel
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 4th Nov 2013
Location: UK
Posted: 27th Jul 2015 20:13
Okay, what I mean is, if you walk over lava or glass/spiked floor, the more you walk over it, the more your player becomes hurt by it. How is this done exactly? Is it done through scripting, or by other means? I was playing the old Tomb Raiders and thought this would be a good idea!
GPU: GTX 660, CPU: i7 3770 Intel 3.40ghz x4, PSU: 650 Watt, RAM: 8GB DDR3, OS: Win7 Ultimate 64-bit
PM
Inertia
9
Years of Service
User Offline
Joined: 12th Jul 2015
Location: SoCal, USA
Posted: 28th Jul 2015 01:14
Hi Dralel, here's a script that would do it:



So to use this, just put a trigger zone down where you want the damage to occur. Edit the trigger zone so that this script (name it 'plrinzone_hurt.lua') is used instead of the default plrinzone.lua. Stretch the trigger zone to fit the area needed. The first two variables at the top of the script can be changed to suit your needs: 'damage' is the amount of damage dealt, and 'interval' is the amount of time in milliseconds that damage is dealt.

Hope this helps,
Rick
Win7 x64 | i5 @3.3GHz | 4GB RAM | GTX580 1.5 GB
PM
Dralel
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 4th Nov 2013
Location: UK
Posted: 28th Jul 2015 15:05
Awesome, thanks alot that's exactly what I needed!
PM

Login to post a reply

Server time is: 2024-12-22 01:40:00
Your offset time is: 2024-12-22 01:40:00