Posted: February 20th, 2006, 12:29 am
I can get all the way nearly >.<KillerSam wrote:doubt it drofder...you will get through first door MAYBE, then u r screwed...i can swear that.
CoDJumper.com - For all your CoDJumping needs!
https://codjumper.com/forums/
I can get all the way nearly >.<KillerSam wrote:doubt it drofder...you will get through first door MAYBE, then u r screwed...i can swear that.
Code: Select all
gap260()
{
gap260_trig = getent ("260_trig","targetname");
gap260_org = getent ("260_org", "targetname");
while (1)
{
players = getentarray("player", "classname");
for(i=0;i<players.size;i++)
{
gap260_trig waittill ("trigger",user);
user iprintlnbold ("Well done, you're a pro! Now go make a new record in the EXPERTZ ONLY section!");
user playsound("clap");
wait 3;
}
wait 3;
}
}
Code: Select all
gap260()
{
gap260_trig = getent ("260_trig","targetname");
gap260_org = getent ("260_org", "targetname");
while (1)
{
gap260_trig waittill ("trigger",user);
user iprintlnbold ("Well done, you're a pro! Now go make a new record in the EXPERTZ ONLY section!");
user playsound("clap");
wait 3;
}
}
Code: Select all
gap260()
{
gap260_trig = getent ("260_trig","targetname");
gap260_org = getent ("260_org", "targetname");
while (1)
{
gap260_trig waittill ("trigger",user);
user iprintlnbold ("Well done, you're a pro! Now go make a new record in the EXPERTZ ONLY section!");
user playlocalsound("clap");
wait 3;
}
}
Code: Select all
user playlocalsound
Yeh, I found it in my "command list" and it looked like the answer so I edittedLuke wrote:Thanks,worksCode: Select all
user playlocalsound
Code: Select all
secret_door()
{
door1_trig = getent("door1_trig","targetname");
door1 = getent ("door1","targetname");
while (1)
{
door1_trig waittill ("damage", idamage);
if(idamage > 100)
{
user iprintlnbold ("Great Shot!");
door1 moveto ((0, 48, 0), 3,1,2);
door1 waittill ("movedone");
wait 3;
door1 moveto ((0, 0, 0), 3,1,2);
door1 waittill ("movedone");
wait 5;
}
else if(idamage < 100)
user iprintlnbold ("Try again");
}
}
Code: Select all
main()
{
thread door_trigger();
}
door_trigger()
{
door1_trig = getent("door1_trig","targetname");
door1 = getent ("door1","targetname");
accum = 0;
while (accum < 300)
{
door1_trig waittill ("damage", iDamage);
{
accum = accum + iDamage;
}
}
door1 movez(300, 1);
door1 waittill("movedone");
door1 movez(-300, 1);
door1 waittill("movedone");
thread door_trigger();
}
Code: Select all
accum = accum + iDamage;
Code: Select all
door1 movez(300, 1);
door1 waittill("movedone");
door1 movez(-300, 1);
door1 waittill("movedone");
Code: Select all
thread door_trigger();
sweet! thanksDrofder2004 wrote:The accumulating damage switch.
A run down on what this script does.Code: Select all
main() { thread door_trigger(); } door_trigger() { door1_trig = getent("door1_trig","targetname"); door1 = getent ("door1","targetname"); accum = 0; while (accum < 300) { door1_trig waittill ("damage", iDamage); { accum = accum + iDamage; } } door1 movez(300, 1); door1 waittill("movedone"); door1 movez(-300, 1); door1 waittill("movedone"); thread door_trigger(); }
When the thread is started it sets accum to 0. (Accum can be named anything you want).
The "while" script is then set in motion, it will keep running, until accum becomes greater than 300.
While this is running, the door trigger is waiting until it takes damage, and it record the damage it takes as "iDamage" (this can also be renamed).
iDamage is then accumulated by this piece of codeHow this works.Code: Select all
accum = accum + iDamage;
accum = 0 and iDamage = 50.
accum (0) + iDamage(50) = accum(now accum = 50 not 0).
accum(50) + iDamage(50) = accum(100)
accum(100)....
Once accum = 300+ the while script ends and the script continues.The door opens and then closes again. (This can be any action, moving platform, door, etc)Code: Select all
door1 movez(300, 1); door1 waittill("movedone"); door1 movez(-300, 1); door1 waittill("movedone");
The thread is restarted.Code: Select all
thread door_trigger();
Accum is reset to 0.
Have Fun
Maybe you can fix the bug near the end that stops the platforms from being used only oncePedsdude wrote:Niiiiiiiiiiiiiiiice
By the way, I'm redesigning the secret room to stop people getting as close as they have done, so will rerelease a later version of peds_pace in the near future.
Code: Select all
end_trig = getent("end_trig","targetname");
while(1)
{
end_trig waittill ("trigger",user);
user iprintlnbold("Congrats");
}
In one of the scripts i showed u for the text (which i found somewhere) it also had this peice of code after the while (1)Drofder2004 wrote:Maybe you can fix the bug near the end that stops the platforms from being used only oncePedsdude wrote:Niiiiiiiiiiiiiiiice
By the way, I'm redesigning the secret room to stop people getting as close as they have done, so will rerelease a later version of peds_pace in the near future.
Also, maybe add something to the end to notify them they are finished.
Code: Select all
end_trig = getent("end_trig","targetname"); while(1) { end_trig waittill ("trigger",user); user iprintlnbold("Congrats"); }
Code: Select all
players = getentarray("player", "classname");
for(i=0;i<players.size;i++)
{
It took me a lot of reading and asking questions to find out what this done (I thank Ezekiel Victor for his help).Luke wrote: In one of the scripts i showed u for the text (which i found somewhere) it also had this peice of code after the while (1)I left that in there coz i thought maybe u forgot to add it in the new script you suggested, but u didn't add it for peds script either...so is that not needed? whats it for otherwiseCode: Select all
players = getentarray("player", "classname"); for(i=0;i<players.size;i++) {
Code: Select all
players = getentarray("player", "classname");
Code: Select all
for(i=0;i<players.size;i++)
Code: Select all
i=0
Code: Select all
i<players.size
Code: Select all
While, 'i' is less than the amount of players.
Code: Select all
i++
Code: Select all
'i' equals 0. While 'i' is less than the amount of players, add 1 to 'i'
Code: Select all
players[i] thread dosomething();