Question Using FXS/Clips

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
Disclaimer: Before you read this just know I'm new to modding and I thought what better way to learn than to do it through Black Ops 2 so if you expect me to be a professional and know everything, please don't. I'm just looking for some advice or a point in the right direction.

Anyways,,
How would I go about using an FX?
I'm trying to make a custom mystery box script but I was also wanting to mod wall buyables and I'm not sure how. I seen it done before and I want to learn how.
Or does FX's even have anything to do with modding wall buyables?

I was wanting to know how to use FX's because I was thinking it would help in modding it
Because I found this in some FX Dump "maps/zombie/fx_zmb_wall_buy_claymore"

Also would anyone tell me how would I go about setting a clip to a model? I've realized trying to set a model to a collision is dumb of me, but I need help setting a clip to a model or is that even possible? Been wanting this to try and make a SKY-Base in zombies and been looking forever on how to just spawn 1 simply model and setting a clip to it. But I'm too dumb. (Btw I'm self taught in coding) I never learned by watching some video or going to school for. So mainly I just read others codes and modify trey-archs provided code.

If you could change this code up to make it so it spawns a "test_sphere_silver" with a clip I'd love you forever.

doSpawnTest1()
{
solid = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
solid setModel("test_sphere_silver");
solid = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
solid setModel("collision_clip_sphere_64");
}
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
How would I go about using an FX?
Code:
playFx( < fx >, < origin > );
doSpawnTest1()
{
solid = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
solid setModel("test_sphere_silver");
solid = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
solid setModel("collision_clip_sphere_64");
}
Code:
doSpawnTest1()
{
    solid = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
    solid setModel("test_sphere_silver");
    collision = spawn("script_model", self getTagOrigin("j_head")+anglesToForward(self getPlayerAngles()) * 150);
    collision setModel("collision_clip_sphere_64");
}
 

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
FX works fine thank you.
But,
I tried your code for the collision and it didn't work, it spawns in the model but it wont set a collision. I just walk right through it..
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
FX works fine thank you.
But,
I tried your code for the collision and it didn't work, it spawns in the model but it wont set a collision. I just walk right through it..
Have a look through the collisions and find the correct one.
 

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
Oh I'm an idiot sorry I didn't have it set as an precachemodel xD Thank you, btw no where on any forums have I found anything on how to set collisions/clips. Wish there was more tutorials on this kind of stuff but I guess you need to know how to code to really get into it
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
Thank you, btw no where on any forums have I found anything on how to set collisions/clips. Wish there was more tutorials on this kind of stuff but I guess you need to know how to code to really get into it
Just spawning models, so its not really needed.
 

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
Would you mind telling me how to spawn a model at a certain position using coordinates?
Because the way im doing it now is from crosshair
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
Code:
model = spawn( < model >, < origin > );
You can use
Code:
self iprintln(self.origin);
to get your origin then just copy the coords.
 

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
So if I wanted to spawn an object on a certain point id just
solid = spawn("script_model", (-1.1, -1.1, 1.1);
solid setModel("test_sphere_silver");
?
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
So if I wanted to spawn an object on a certain point id just
solid = spawn("script_model", (-1.1, -1.1, 1.1);
solid setModel("test_sphere_silver");
?
Pretty much, here is an example.
506321d9ffbc545afa3aa4a1c169700c.png
 

Arkinamez

Well-Known Member
Messages
7
Reaction score
1
Points
203
Hey man you got a skype or something where if I have anymore questions you'd be willing to help on?
 
Top