Scripts / How to destroy entity and spawn another

Author
Message
SmugglerSynku
9
Years of Service
User Offline
Joined: 8th May 2015
Location:
Posted: 14th Jun 2016 16:56
Is there a way to do something like this:
When i kill one enemy there is spawned another or whole group of them.
When i destroy (for example)wooden box, some planks are spawned at this place (it simulating descructable enviorment)

This type of "events" were very easy to do in fpsc x9, but i have no idea how to do this in gameguru
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Jun 2016 20:28
Quote: "When i kill one enemy there is spawned another or whole group of them."


https://forum.game-guru.com/outbound?url=https%3A%2F%2Fforum.game-guru.com%2Fthread%2F207801%3Fpage%3D10%23msg2533489

Quote: "When i destroy (for example)wooden box, some planks are spawned at this place (it simulating descructable enviorment) "


You'll need debris shape (planks) model.
Place "debris" closest to your explodable item, and make it "SpawnAtStart = no" via properties panel.
Assuming explodable item named "myItem" and debrishape named "MyDebris", so go to my "myItem" properties and type "MyDebris", in "IfUsed" field. (without quotes).

3com



Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
SmugglerSynku
9
Years of Service
User Offline
Joined: 8th May 2015
Location:
Posted: 15th Jun 2016 22:48
Quote: "You'll need debris shape (planks) model.
Place "debris" closest to your explodable item, and make it "SpawnAtStart = no" via properties panel.
Assuming explodable item named "myItem" and debrishape named "MyDebris", so go to my "myItem" properties and type "MyDebris", in "IfUsed" field. (without quotes)."


It was working that way in fpsc x9, but when i'm trying it in game guru nothing happens - my box exploded, but nothing appear
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Jun 2016 14:31
you need to include a little script like this to call the 'ifused' field and clear away non character entities.
so...
Quote: "Place "debris" closest to your explodable item, and make it "SpawnAtStart = no" via properties panel.
Assuming explodable item named "myItem" and debrishape named "MyDebris", so go to my "myItem" properties and type "MyDebris", in "IfUsed" field. (without quotes).""

then assign the script attached to the "myItem" and make sure it is set to static = no and strength is above 0.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-12-22 18:16:06
Your offset time is: 2024-12-22 18:16:06