Scripts / explode script

Author
Message
tripper
16
Years of Service
User Offline
Joined: 12th Oct 2007
Location: United Kingdom
Posted: 3rd Aug 2014 13:39
has any one managed to do this yet a explode script ive bean trying but cant do it lol trying to create a explode from a trigger zone

tripper1977
Sparrowhawk
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 12th Apr 2011
Location: Planet Magrathea
Posted: 3rd Aug 2014 14:33
The only thing I can do is put an explosive barrel down, and then set its health to 0 in script, if that makes sense. Not sure of any other way

Custom Mac Pro (2014): OSX 10.10 (Yosemite) and Windows 8.1 Pro:

Octa-threaded Xeon E5 v2 @ 3.7Ghz [9775]; Dual AMD FirePro D500 (3GB VRAM Each) [3769]; 12GB RAM [2517]; 512GB SSD [9074];
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 3rd Aug 2014 14:37
I haven't tried it yet and I may later today if I get time, but I believe if you set an object as explodable, when it's health reaches 0 it will explode. You could modify the player in zone script to make your entity's health 0, thereby going kablooey.

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
tripper
16
Years of Service
User Offline
Joined: 12th Oct 2007
Location: United Kingdom
Posted: 3rd Aug 2014 16:17
i cant figure it out can only get stuff to explode when you shoot at it lol

tripper1977
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 3rd Aug 2014 17:15 Edited at: 3rd Aug 2014 17:16
@tripper-I tried this and it works!







-- LUA Script - precede every function and global member with lowercase name of script + '_main'

-- Player Enters Win Zone



function plrinzoneexplode_init(e)

end



function plrinzoneexplode_m
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Aug 2014 17:31
the actual command is
Quote: "SetEntityHealth(e,v)"

rather than
Quote: "SendMessageI("setentityhealth",1,0)"


but it'll work eitherway, just shorter and looks better i guess

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 3rd Aug 2014 17:34
Yeah, I didn't even notice that, but yeah it still works, I just copied and pasted the line from the Global script!

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
tripper
16
Years of Service
User Offline
Joined: 12th Oct 2007
Location: United Kingdom
Posted: 3rd Aug 2014 17:41
yes yes that's wot i was looking for it works perfect thanks for all your work and time

tripper1977
tripper
16
Years of Service
User Offline
Joined: 12th Oct 2007
Location: United Kingdom
Posted: 3rd Aug 2014 18:12
i dont get where do i put the number of the entity in the script lol

tripper1977
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 3rd Aug 2014 18:37
It's the first value in "SetEntityHealth(e,v)"; e= entity #

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM

Login to post a reply

Server time is: 2024-05-03 10:41:08
Your offset time is: 2024-05-03 10:41:08