Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gani warping (https://forums.graalonline.com/forums/showthread.php?t=13312)

Poogle 09-29-2001 10:11 PM

Gani warping
 
How do you make a gani happen before you change levels then when you enter the level on the warper play a diff. gani?

Thak2 09-29-2001 10:28 PM

This should work... there is probably a better way of doing it though.

NPC Code:

if (weaponfired) {
setani ganihere,;
sleep 0.5;
timeout = 0.1;
setlevel2 levelname.graal,x,y;
}
if (strequals(#L,levelname.graal)&&timeout) {
setani otherganihere,;
timeout = 0;
}


G_yoshi 09-29-2001 10:31 PM

Re: Gani warping
 
Quote:

Originally posted by Poogle
How do you make a gani happen before you change levels then when you enter the level on the warper play a diff. gani?
you play the gani and use 'sleep' for the lenght of the animation plus at least .5 seconds. That would work best

Metal-Slug 09-29-2001 10:31 PM

that ime out hs to 0.5 doesn't it?

G_yoshi 09-29-2001 10:35 PM

Quote:

Originally posted by Metal-Slug
that ime out hs to 0.5 doesn't it?
um, IF I can understand that, you don't necessarilly need a timeout loop if it is a NPCW. Heh, I have a simple NPCW I use offline on my PW for warping to specific places. It plays the gani, then warps me to where I told it. I don't have access to it right now (not at home, at school right now).

Thak2 09-29-2001 10:39 PM

The timeout was in there because I didn't know if the player entered the level normally would the gani set off or not... you can remove the timeout junk if it doesn't.

G_yoshi 09-29-2001 11:05 PM

Quote:

Originally posted by Kaimetsu


You could use playerenters.

Is it me, or do people seem to miss the obvious?

G_yoshi 09-29-2001 11:31 PM

Quote:

Originally posted by Kaimetsu


It's not just you...

I thought so :D

Poogle 09-30-2001 01:18 AM

Quote:

Originally posted by Thak2
This should work... there is probably a better way of doing it though.

NPC Code:

if (weaponfired) {
setani ganihere,;
sleep 0.5;
timeout = 0.1;
setlevel2 levelname.graal,x,y;
}
if (strequals(#L,levelname.graal)&&timeout) {
setani otherganihere,;
timeout = 0;
}


Thanks Ill go test this!

Thak2 09-30-2001 01:25 AM

Quote:

Originally posted by Kaimetsu


You could use playerenters.

Playerenters would effect people who enter the level normally too, not just people who warp there...

Poogle 09-30-2001 01:28 AM

=/ Nope doesnt work i tried and it umm nerver did the enter one

Poogle 09-30-2001 01:31 AM

Quote:

Originally posted by Thak2


Playerenters would effect people who enter the level normally too, not just people who warp there...

Yeah thats why I posted this thred heh Fah. takes a short cut if you havent noticed heh

Thak2 09-30-2001 01:32 AM

Quote:

Originally posted by Poogle
=/ Nope doesnt work i tried and it umm nerver did the enter one
It didn't? Did you fill it out properly?

Poogle 09-30-2001 01:38 AM

Quote:

Originally posted by Thak2


It didn't? Did you fill it out properly?

Yeah I think heres the script:
if (playerenters) {
message Warp Ring;
}

if (playertouchsme) {
toweapons Warp Ring;
}
if (weaponfired) {
if (kabot) {
setani kabot_spiny,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
setani liwarp1,;
sleep 1;
timeout = 0.1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
if (firedonhorse) {
setani spiny_horse,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
if (bomyweaponfired) {
setani bomy_spiny,;
freezeplayer 2;
sleep 2;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
while (human) {
if (strequals(#L,lostislands_starting.graal)&&timeout ) {
setani liwarp2,;
timeout = 0;
}
}

Thak2 09-30-2001 01:50 AM

this might work better.
NPC Code:

if (playertouchsme) {
toweapons Warp Ring;
}
if (weaponfired) {
if (kabot) {
setani kabot_spiny,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
}
if (firedonhorse) {
setani spiny_horse,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
if (bomyweaponfired) {
setani bomy_spiny,;
freezeplayer 2;
sleep 2;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
if (weaponfired&&human) {
setani liwarp1,;
sleep 1;
timeout = 0.1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
if (strequals(#L,lostislands_starting.graal)&&timeout &&human) {
setani liwarp2,;
timeout = 0;
}



now... does that work?

Poogle 09-30-2001 01:53 AM

Quote:

Originally posted by Thak2
this might work better.
NPC Code:

if (playertouchsme) {
toweapons Warp Ring;
}
if (weaponfired) {
if (kabot) {
setani kabot_spiny,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
}
if (firedonhorse) {
setani spiny_horse,;
freezeplayer 1;
sleep 1;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
if (bomyweaponfired) {
setani bomy_spiny,;
freezeplayer 2;
sleep 2;
setlevel2 lostislands_starting.graal,24.5,21.5;

}
if (weaponfired&&human) {
setani liwarp1,;
sleep 1;
timeout = 0.1;
setlevel2 lostislands_starting.graal,24.5,21.5;
}
if (strequals(#L,lostislands_starting.graal)&&timeout &&human) {
setani liwarp2,;
timeout = 0;
}



now... does that work?

Yeah thanks!


All times are GMT +2. The time now is 11:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.