Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Dodgeball Script (https://forums.graalonline.com/forums/showthread.php?t=22882)

Link188 02-03-2002 03:51 AM

Dodgeball Script
 
This is what i've come up with so far...
I wanna make it so that you throw the ball AT THE OTHER TEAM and if it hits them, they get warped to the "out box". I want to have guilds like Red Tem & Blue Team. If it hits nobody, then the ball just stops. Also, i want the ball to go farther then regular...

if (created) {
canbecarried;
}
if (playertouchsme) {
}
if (thrown) {
setstring thrown,#g;
sleep2;
setstring thrown,;
}
if (playertouchsme&&!strequals(thrown,#g)) {
setlevel2 2,2,2;
}

Link188 02-03-2002 04:02 AM

Quote:

Originally posted by Kaimetsu
Hey you, you shot me in laser tag. NO HELP FOR YOU.
Grrr, thats not fair! Its just a game!:grrr:

Dustey 02-03-2002 04:04 AM

umm i think u wll have to use vectors almost like making a bow type thing

Goboom 02-03-2002 05:22 AM

I like grudges! :D

nyghtGT 02-03-2002 05:28 AM

Re: Dodgeball Script
 
Quote:

Originally posted by Link188
This is what i've come up with so far...
I wanna make it so that you throw the ball AT THE OTHER TEAM and if it hits them, they get warped to the "out box". I want to have guilds like Red Tem & Blue Team. If it hits nobody, then the ball just stops. Also, i want the ball to go farther then regular...

if (created) {
canbecarried;
}
if (playertouchsme) {
}
if (thrown) {
setstring thrown,#g;
sleep2;
setstring thrown,;
}
if (playertouchsme&&!strequals(thrown,#g)) {
setlevel2 2,2,2;
}

Well you've got a good but to go.

I suggest using testing playerx's and playery's to check
it and have it go the direction you throw, also make sure
you have it where when thrown it has to stay with 64
(x and y).

TDK_RC6 02-03-2002 08:14 AM

Quote:

Originally posted by Kaimetsu
Hey you, you shot me in laser tag. NO HELP FOR YOU.
lol, :P

you could use triggeraction to 'hit' the player in front of it, depending on which way it was thrown, and check if they are part of your team or not, then hit them

BocoC 02-03-2002 10:20 AM

Quote:

Originally posted by Kaimetsu
Hey you, you shot me in laser tag. NO HELP FOR YOU.
LOL

Gohan43331 02-04-2002 01:43 AM

Re: Dodgeball Script
 
Quote:

Originally posted by Link188

if (thrown) {
setstring thrown,#g;
sleep2;
setstring thrown,;
}
if (playertouchsme&&!strequals(thrown,#g)) {
setlevel2 2,2,2;
}

Instead of strings (which are attached to players, i suppose(corret if wrong)), maybe this.-vars would work...
NPC Code:

if (thrown) {
this.thrown = 1; // 1 = red, 2 = blue, etc...
timeout = 2;
}
if (timeout) this.thrown = 0; //thrown off
if (playertouchsme) {
if (strequals(#g,Red)) this.thrownat=1;
if (strequals(#g,Blue)) this.thrownat=2;
if (this.thrown!= this.thrownat) { setlevel2 blah.graal,2,2; }
}


Dunno...but it would depend on if strings are with players not the whole level...

Gohan


All times are GMT +2. The time now is 08:09 PM.

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