Jump to content
Sign in to follow this  
Flarmapoint 2

Bit of Gib script

Recommended Posts

Hello everyone, ok well i have some script, i can show you, this will gib the npc, but i have no other code, im stuck, i need the conditions, for first, finding out if the npc is dead, and second. is npc moving at a high volocity due to explosion.

Here is the script

_unit = _this select 0;

_VelocityX = random 10;

_VelocityY = random 7;

_VelocityZ = random 10;

_direc = getDir _unit

~0.0000002

_gib001 = "HEAD_GIB" createVehicle getpos _unit; _gib001 setVelocity [_VelocityX,_VelocityY,_VelocityZ]

_gib001 setpos [ getPos _unit select 0, getPos _unit select 1]

_gib001 setDir _direc

_gib002 = "TORSO_GIB" createVehicle getpos _unit; _gib002 setVelocity [_VelocityZ,_VelocityX,_VelocityZ]

_gib002 setpos [ getPos _unit select 0, getPos _unit select 1]

_gib002 setDir _direc

_gib003 = "LEFT_ARM_GIB" createVehicle getpos _unit; _gib003 setVelocity [_VelocityZ,_VelocityX,_VelocityZ]

_gib003 setpos [ getPos _unit select 0, getPos _unit select 1]

_gib003 setDir _direc

(And so on for the other body parts)

deleteVehicle _unit

Any help, would be nice :)

Use this script to play around with if you wish!

Here are the gib models

http://www.filefront.com/14168235/slx_wounds.zip

config file

http://www.filefront.com/14184953/config.zip

Because the config was so big, i went through it, and picked out sections of code that might be useful for those of us who are experimenting with this :)

Config useful code

http://www.filefront.com/14185261/config%20help.zip

F2

Edited by Flarmapoint 2
Grammer

Share this post


Link to post
Share on other sites

Is "Gib" even a part of Arma2 I couldn't find any reference to it.

If I try to run the script it returns various errors like this.

Cannot create non-ai vehicle LEFT_ARM_GIB,

Share this post


Link to post
Share on other sites

Would be nice if you could get this running!

Share this post


Link to post
Share on other sites

LEFT_ARM_GIB, is refering to a model called LEFT_ARM_GIB :)

You need some models, like the left, right arms, legs, torso etc,,, and name them like above. there should be no errors then.

Edited by Flarmapoint 2

Share this post


Link to post
Share on other sites

If your using a trigger then in the condition it could be

!alive unitname 

or if you need the other parts of the trigger

this and !alive unitname

for velocity it would be

(velocity unitname select 0) == 10 or (velocity unitnamer select 1) == 10 or (velocity unitname select 2) == 20

or whatever combinations you need for the condition

and in the On act you would call the code

[unitname] exec"nameofscript.sqs"

whatever name you've saved it as.

Share this post


Link to post
Share on other sites
If your using a trigger then in the condition it could be
!alive unitname 

or if you need the other parts of the trigger

this and !alive unitname

for velocity it would be

(velocity unitname select 0) == 10 or (velocity unitnamer select 1) == 10 or (velocity unitname select 2) == 20

or whatever combinations you need for the condition

and in the On act you would call the code

[unitname] exec"nameofscript.sqs"

whatever name you've saved it as.

wow thanks for this very helpful reply buddy :)

Also, feel free to take the script i posted, and play around with it, if you can work out the script, you just need models right? Well i curently dont have any models to try it out on, but cutting a bis soldier up into the seperate parts using oxygen shouldnt be hard right?

Edited by Flarmapoint 2

Share this post


Link to post
Share on other sites

I don't have the models so there isn't really anything I can do.

Share this post


Link to post
Share on other sites
I don't have the models so there isn't really anything I can do.

Actually, i can upload all the model parts that would be needed, arms, legs, torso, and head, because i have the slx mod, and ive just found out that it can be taken and edited, for our own purposes.

So shall i do this?

Edited by Flarmapoint 2

Share this post


Link to post
Share on other sites
If you like I'll take a look.

Awesome !!! :D

Uploading file to filefront

Edit:

Here are the models

http://www.filefront.com/14168235/slx_wounds.zip

---------- Post added at 12:36 AM ---------- Previous post was at 12:32 AM ----------

The folder, contains a dta folder, ignore this if you wish, it has some (charred textures) in there for the limbs, aswell as some other stuff i forgot to delete lol

Edited by Flarmapoint 2

Share this post


Link to post
Share on other sites

Sorry Flarmapoint2 it's beyond my understanding, I'm not even sure you can use p3d models without making a full pbo file with config and bin files.

Share this post


Link to post
Share on other sites

F2k Sel are the right sub folders in the folder buddy?

---------- Post added at 01:09 AM ---------- Previous post was at 01:08 AM ----------

Sorry Flarmapoint2 it's beyond my understanding, I'm not even sure you can use p3d models without making a full pbo file with config and bin files.

Ah ok, no probs :)

---------- Post added at 01:12 AM ---------- Previous post was at 01:09 AM ----------

I can upload the orginal contents of the wound folder, if you want to take a look at it, it contains everything, scripts, config, models, textures etc..?

Share this post


Link to post
Share on other sites

I've found the original and been looking at but I don't have a clue, I've never done moding and I think you'd need some understanding of how they work.

Share this post


Link to post
Share on other sites
I've found the original and been looking at but I don't have a clue, I've never done moding and I think you'd need some understanding of how they work.

ah i see, i didnt realise :) i thought you were a modder lol

Well hopefully a modder will drop by and show us the way :D

Share this post


Link to post
Share on other sites

The models just need a config file to get them in the game. Is there a config file with the addon anywhere?

I've been playing with gibbing and its really super simple to do. Its easy to use this script executed as a "killed" eventhandler

_unit = _this select 0;

_gibspeed = 6;

sleep 0.001;

_speed = speed _unit;

if (_speed >= _gibspeed || _speed <= -_gibspeed) then {whatever effects you want for gibbing};

If the unit is moving fast 0.001 seconds after death it was either shot with an explosive or run over by a vehicle.

Edited by Sakura_Chan

Share this post


Link to post
Share on other sites

I got it from here, I don't know the rights and wrongs of modding someone elses stuff though. Flarmapoint 2 did mention he was allowed to I think.

http://www.armaholic.com/page.php?id=3121

I found that when I looked at it one thing required another and another so I didn't take it any further.

Share this post


Link to post
Share on other sites
The models just need a config file to get them in the game. Is there a config file with the addon anywhere?

I've been playing with gibbing and its really super simple to do. Its easy to use this script executed as a "killed" eventhandler

_unit = _this select 0;

_gibspeed = 6;

sleep 0.001;

_speed = speed _unit;

if (_speed >= _gibspeed || _speed <= -_gibspeed) then {whatever effects you want for gibbing};

If the unit is moving fast 0.001 seconds after death it was either shot with an explosive or run over by a vehicle.

Hey, thanks for your comment :) could you please post the whole process to get it to work? Seems complicated to me still lol

Could you post a video of your gib effect, just to get idea of what it looks like?

Ive added the config file to my initial post.

The config file is huge, but thats because the addon has all sorts of blood scripts, and other effects.

It didnt take me long to find the gib section though :)

---------- Post added at 06:12 PM ---------- Previous post was at 05:22 PM ----------

Sections of useful config code:

http://www.filefront.com/14185261/config%20help.zip

Edited by Flarmapoint 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×