Posts
28
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!while(1)
{
//iprintln("in the while loop!");
currentweapon = players[i] getCurrentWeapon();
if(currentweapon == "m2_flamethrower_zombie_upgraded")
{
while(players [i] isfiring())
{
if(players [i] isMeleeing() == false && jump_param <200) //300 before
{
//wait .02; //the function works ok without this. the problem is tap firing. after firing there is a slight delay until the hud catches up. the wait simulates this slightly
jump_param = jump_param + 4.0;
//iprintln("in first func jump param is going up and " + jump_param );
thread flamey_jump(jump_param);
}
//there just needs to be a little wait time between these two. have too many waits now the flamethrower is jumpy
wait .05;
}
wait .2;
while ( players[i] isfiring() == false && jump_param >0 || players[i] isMeleeing() == true)
{
if (jump_param >= 200) //300 before
{
wait 1.5;
jump_param = jump_param - 3;
}
//if (jump_param >0)
//{
//thread flamey_jump(jump_param);
wait .08; //this is the problem right here, i need to wait to make the thing more sensitive but that holds up the lift up part, gotta figure it out
jump_param = jump_param - 1;
iprintln("in first func jump param is going down and " + jump_param );
//}
//continue; //thread flamey_jump(jump_param);
}
//thread flamey_jump(jump_param);
}
wait .05;
flamey_jump(jump_param)
{
players = get_players();
for (i = 0; i < players.size; i++)
{
if (isDefined( jump_param ))
{
iprintln("in second function jump_param is " + jump_param);
}
//i think what is happening here is a race condition (especially with a while loop)
if(jump_param<200) //setting this to while causes jump_param to go beserk and change values in the loop. want to change this to while so this can execute without waiting on 1st while loop
{
// etc. etc. lets the player fly. if i check jump_param in here it is wrong by the way