Making loop bomb explosions
#1

Hi guys,

Soz if there is a post about this but the search system kinda suckz

Could some body be kind enough to make a tut on how to make loop explosions for me or send me to another topic? Thanks alot guys

and please dont just copy and paste the search url its just dry and immature
Reply
#2

Any one?
Reply
#3

Put the explosion in a public function and use a timer to call it.

pawn Код:
//Top of the script
forward Explosion(Float:X, Float:Y, Float:Z, type, Float:radius);
pawn Код:
//Outside other public functions
public Explosion(Float:X, Float:Y, Float:Z, type, Float:radius)
{
    CreateExplosion(X, Y, Z, type, radius);
    return 1;
}
pawn Код:
//In a command. This will create 3 explosions with a 1 second interval between them.
CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:radius); //Replace them with the appropriate information
SetTimerEx("Explosion", 1000, false, "fffdf", Float:X, Float:Y, Float:Z, type, Float:radius); //Again, replace the same variables
SetTimerEx("Explosion", 2000, false, "fffdf", Float:X, Float:Y, Float:Z, type, Float:radius); //Again, replace the same variables
Reply
#4

ok i am completley confused with that, could you/someone else do a step by step tut it would be greatlty appresiated
Reply
#5

Quote:
Originally Posted by Snoopdog
Посмотреть сообщение
ok i am completley confused with that, could you/someone else do a step by step tut it would be greatlty appresiated
I'm not seeing how he didn't go step-by-step already....getting the notion that your a new scripter.......
Reply
#6

Anyone else?
Reply
#7

new explosionsleft = 3;

public CreateExplosions()
{
if(explosionsleft != 0)
{
CreateExplosions(playerid,...);
SetTimer(...) //make it do it again
explosionsleft--;
}
else if(explosionsleft == 0)
{
KillTimer(...);
explosionsleft = 3;
}
return 1;
}
Reply
#8

Carlton, FOR statements are done within a second, so that is probably the worst way to make the loop.
Reply
#9

Quote:
Originally Posted by Conroy
Посмотреть сообщение
Carlton, FOR statements are done within a second, so that is probably the worst way to make the loop.
A loop are "for" or "while" statements. He asked for a loop, I gave him a loop.
Reply
#10

Ok, thank you guys heaps for you contributions but could someone actually make me a tut please like step by step or redirect me to one, Again i do appreciate your contributions but i need a tutorial
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)