Random Script Help
Moderator: Core Staff
Random Script Help
I just started scripting yesterday and have some questions.
(I'll probably have more coming, so I'll just post here)
First would be
how can i stop a thread until the players ammo is 0.
I know self GetWeaponAmmoStock(self GetCurrentWeapon()) gives the total ammo (even had a hard time figuring that out).
So would it be possible to do something like
waittill(-the ammo is 0-);
self givemaxammo(..);
(I'll probably have more coming, so I'll just post here)
First would be
how can i stop a thread until the players ammo is 0.
I know self GetWeaponAmmoStock(self GetCurrentWeapon()) gives the total ammo (even had a hard time figuring that out).
So would it be possible to do something like
waittill(-the ammo is 0-);
self givemaxammo(..);
-
- CJ Worshipper
- Posts: 289
- Joined: December 5th, 2009, 7:12 am
- Location: Australia
Re: Random Script Help
You could just try
It just saves the need for an if statement
Code: Select all
while(GetWeaponAmmoStock(self GetCurrentWeapon()) > 0){
wait 0.1;
}
self giveMaxAmmo(self GetCurrentWeapon());// This will run when the ammo is 0
Re: Random Script Help
Hm ok. I've thought about that.
So there isnt a way to just make the code stop and then continue.
Is it bad if too many Scripts are running parallel?
So there isnt a way to just make the code stop and then continue.
Is it bad if too many Scripts are running parallel?
Re: Random Script Help
Thanks.
And too many moving objects + players on server make the objects lag?
In codjumper_training if too many people are on, the conveyor belt lags.
Is it just how cod4 handles it or is something in the script which causes the lag?
And too many moving objects + players on server make the objects lag?
In codjumper_training if too many people are on, the conveyor belt lags.
Is it just how cod4 handles it or is something in the script which causes the lag?
Re: Random Script Help
Ah ok.
Still got some mapping questions ^^;
I have a terrain prefab and i cant make it non-coliding (maybe because it being terrain).
And is there a way to make moving water?
Still got some mapping questions ^^;
I have a terrain prefab and i cant make it non-coliding (maybe because it being terrain).
And is there a way to make moving water?
Re: Random Script Help
Thanks KS.
I got the terrain to work somehow oO.
The water. ill go look for.
Just 1 last question, then im ok for now^^
Where do i get the texture aa_slippery.
like on ib_glass_v3 the slide has it.
I got the terrain to work somehow oO.
The water. ill go look for.
Just 1 last question, then im ok for now^^
Where do i get the texture aa_slippery.
like on ib_glass_v3 the slide has it.
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Random Script Help
Can't confirm this but I think it may be a custom texture inside the .iwd of the map? Most of that map looks like custom textures anyway I don't remember seeing any of those textures in normal CoD4.Nekoneko wrote:Where do i get the texture aa_slippery.
like on ib_glass_v3 the slide has it.
-
Re: Random Script Help
well I made that texture using the asset manager.Nekoneko wrote:Where do i get the texture aa_slippery.
like on ib_glass_v3 the slide has it.
you can simply put a check into " special surface properties / slick "
nope, as far as I can remember I only used 2 custom textures .xSnipeZx wrote:Can't confirm this but I think it may be a custom texture inside the .iwd of the map? Most of that map looks like custom textures anyway I don't remember seeing any of those textures in normal CoD4.
The invisible slick texture & the one @ the ski ramp

- r4d

// -> Bouncepatch.com // -> Bouncepatch.com/Research // -> Bouncepatch.com/CommunityVideos // -> #xoxor4d
Who is online
Users browsing this forum: No registered users and 6 guests