Scripts / health.lua on any item

Author
Message
lalemanalex87
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Feb 2015
Location:
Posted: 29th Mar 2015 12:44
was wondering is there a way to get health.lua to work on other items like in the medieval pack there is and herb ball can that be made into health when I but the health.lua on the herb ball it says collected health and the herb ball would vanish but the health on the player didn't change I did notice the properties options are different on the herb ball and the med kits, just wondering if there was a way I could do it thanks
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 29th Mar 2015 12:58 Edited at: 29th Mar 2015 12:59
yes you can, it will involve modifying the FPE file of the object you want to do this with.

If you open the FPE of the Health object, you will see a section called
;identity details
isweapon = 0
isammo = 0
ishealth = 1 <----- this is what your new health object's fpe file needs to look like.
isimmobile = 1

These can be edited in Notepad.

Then you can use the same script, and it should work for you.
Let me know if you need more help.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

lalemanalex87
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Feb 2015
Location:
Posted: 29th Mar 2015 23:33 Edited at: 29th Mar 2015 23:41
;identity details
isweapon = 0
isammo = 0
ishealth = 1
isimmobile = 1

I have to add this right becouse the herb ball dont have it it looks diffent from medbox this is whats in the herb ball:
;header
desc = Herb Ball

;visualinfo
textured = herb ball_D.dds
effect = effectbank\reloaded\entity_basic.fx
castshadow = 0

;orientation
model = herb ball.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
defaultstatic = 1
materialindex = 3
collisionmode = 0

;statistics
strength = 25
explodable = 0
debrisshape = 1

;ai
aiinit = appear.lua
aimain = default.lua
aidestroy = disappear.lua

;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0

what do I have to do and I tried adding it but didn't work
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 29th Mar 2015 23:51 Edited at: 29th Mar 2015 23:51
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 29th Mar 2015 23:52
Give that a try, make sure that the health object is dynamic, is these setting don't turn is so.

Let me know how that works for you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

lalemanalex87
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Feb 2015
Location:
Posted: 30th Mar 2015 00:29 Edited at: 30th Mar 2015 01:05
I dont know what am doing wrong I even deleted what was in the file and copy and pasted what you had there and changed script to health.lua and made dynamic just says collected health but player health don't change

edit: got it to work it was reading the copy of the herb ball still works now thank you
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 30th Mar 2015 05:47
You are welcome.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2024-12-21 14:42:25
Your offset time is: 2024-12-21 14:42:25