Scripts / Setting entity health manually

Author
Message
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 2nd Dec 2014 07:05
I'm trying to get an entity to scale up when shot (instead of dying). Ideally it should be incremental, with health resetting to its original level after reaching 0. However, it seems as though once health is 0, it stays 0. If I use the following code

the prompt reads 0 and the scale jumps straight to 200. With this code
the prompt reads 100, but the scale still jumps straight to 200. This code
seems to do nothing. Is there a way of manually setting entity health (or am I making an obvious error somewhere)?
almightyhood
11
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 2nd Dec 2014 12:16
im no scripter im afraid, but I think health of characters and entities is hard coded to the engine perhaps? and maywell not be changeable yet..
I think 100 is default health for all things, even the player (which can be changed in the start marker), though other than player I don't see away to change health.
would be nice if each entity had the option of how much damage it could take be changed by user in its properties panel..

as for scale, I think 09 release brings in a live scale changing option or something like that. so we can do scale changes with out changing the fpe.

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 amd 4100fx cpu quad core 4gb ram.
PM
tomjscott
User Banned
Posted: 2nd Dec 2014 14:53
You can't set health directly using the g_Entity[e]['health'] global. That's used to get the current health, but not to set it. You must use the SetEntityHealth function to change its health.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0085
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 2nd Dec 2014 14:55
Thanks Tom

Login to post a reply

Server time is: 2024-12-21 17:57:45
Your offset time is: 2024-12-21 17:57:45