Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Skateboard npc (https://forums.graalonline.com/forums/showthread.php?t=24147)

relenakat 02-20-2002 06:56 AM

Skateboard npc
 
How do you make the skateboard make the player faster and how do you equip it for like the ani stuff?

TDK_RC6 02-20-2002 07:07 AM

o my lord, dont you even read any of the other post??

Aknts 02-20-2002 07:34 AM

Quote:

Originally posted by TDK_RC6
o my lord, dont you even read any of the other post??

?? He said how...Like as in teach him not "HEY GIVE ME SCRIPT!".

Falcor 02-20-2002 07:38 AM

first, you must overcome your first rut... learning to script, i know its hard to climb out of that gap. After that, you just make it.

Gee I don't know how to TEACH you to make 1 thing :\.

TDK_RC6 02-20-2002 07:45 AM

oooooo...........


:D

mikepg 02-20-2002 08:20 AM

Re: Skateboard npc
 
Quote:

Originally posted by relenakat
How do you make the skateboard make the player faster and how do you equip it for like the ani stuff?
Maybe it's Unixmad playing a cruel joke on kondidias (sp), lol. Anyways...


Try using playerx and playery values....correspoding with the players direction (0-up 1-left 2-down 3-right).

Like

if (playerdir=0) {playery-=1;
}

Since you are facing up
and the grid of graal looks like this:
0....64 (x)
.
.
64
(y)
you want to subtract (so the player goes up faster)

relenakat 02-20-2002 08:30 AM

thx that's what I was missing from the code

joseyisleet 02-20-2002 08:41 AM

-=Chicken=-
 
Your own your way dude,people like you make me wanna play graal more people who actually learn and take time to ask for help = ),Gs man and you might wanna add Onwalls and stuff theyre basic stuffs = ),ok = ) G/J..
damnit green lol!! josey gonna be Peeved lol,more fun for me.

relenakat 02-20-2002 09:03 AM

Here's what I have but...when my player stops the shoes move

NPC Code:

// NPC made by Sage Deamon Slayer {Dragon Warrior}
if (playertouchsme) {
toweapons Flying shoes;
}
if(weaponfired){
timeout=.5
this.run=0;
}
if (timeout&&this.run==0){
if (playerdir=0) { playery-=.5; timeout=.5 }
if (playerdir=1) { playerx-=.5; timeout=.5 }
if (playerdir=2) { playery+=.5; timeout=.5 }
if (playerdir=3) { playerx+=.5; timeout=.5 }
}
if(timeout&&this.run==1){
freezeplayer .1;
}


relenakat 02-20-2002 09:28 AM

ok thanks I'll try it and see now but do you mean like

NPC Code:
if(playerdir=0&&keydown(0)){


or
NPC Code:
if(playerdir=0){
if(keydown(0)){


relenakat 02-20-2002 09:42 AM

ok thanks then

royce 02-20-2002 09:42 AM

no no no....Check for the walk gani. Use showimg for the player to see the skateboard. Keydown is kinda lame for that in my opinion. Just my opinion.:rolleyes:

relenakat 02-20-2002 09:56 AM

erp...for some reason keydown doesn't work x.x

relenakat 02-20-2002 09:57 AM

Quote:

Originally posted by royce
no no no....Check for the walk gani. Use showimg for the player to see the skateboard. Keydown is kinda lame for that in my opinion. Just my opinion.:rolleyes:
I'll try that since the other one didn't work x.x

royce 02-20-2002 10:18 AM

Sorry to bust your bubble but you cannot have a wrong opinion. You can have a wrong fact but not a opinion. I just hate dealing with keydowns. It's just me.

relenakat 02-20-2002 11:10 AM

hmmm the gani won't work niether will the keydown(0)

Python523 02-20-2002 11:43 AM

5 bucks says the problem is that he didnt loop the timeouts...

nyghtGT 02-20-2002 02:08 PM

Re: Skateboard npc
 
Quote:

Originally posted by relenakat
How do you make the skateboard make the player faster and how do you equip it for like the ani stuff?
The skateboard involve no animation only some sprites for the skateboard. It uses 'keydowns' to add onto the direction the player is going and uses showimg to display the board.

nyghtGT 02-20-2002 02:21 PM

Quote:

Originally posted by royce
Sorry to bust your bubble but you cannot have a wrong opinion. You can have a wrong fact but not a opinion. I just hate dealing with keydowns. It's just me.
keydowns mess up for me sometimes too, but i just keep
tinkering around with em till they work, so i can see why you
would not like them ...

relenakat 02-21-2002 10:01 AM

x.x Well it wasn't the keydown but now....I looped timeouts and it's totally weird x.x it puts me off screen even
NPC Code:
// NPC made by Sage Deamon Slayer {Dragon Warrior}
if (playerenters) {
}
if (playertouchsme) {
toweapons Flying shoes;
}
if(weaponfired){
timeout = .5;
}
while(timeout){
if (playerdir=0) { playery-=3; }
if (playerdir=1) { playery-=3; }
if (playerdir=2) { playerx+=3; }
if (playerdir=3) { playerx+=3; }
timeout = .5;
}


nyghtGT 02-21-2002 10:42 AM

Quote:

Originally posted by relenakat
x.x Well it wasn't the keydown but now....I looped timeouts and it's totally weird x.x it puts me off screen even
NPC Code:
// NPC made by Sage Deamon Slayer {Dragon Warrior}
if (playerenters) {
}
if (playertouchsme) {
toweapons Flying shoes;
}
if(weaponfired){
timeout = .5;
}
while(timeout){
if (playerdir=0) { playery-=3; }
if (playerdir=1) { playery-=3; }
if (playerdir=2) { playerx+=3; }
if (playerdir=3) { playerx+=3; }
timeout = .5;
}


i advise against the use of 'while (timeout)' it basically does the same thing as 'if (timeout)'

relenakat 02-21-2002 10:49 AM

makes sense but what's wrong with the script-like what makes it move meh off screen?

Python523 02-21-2002 10:57 AM

Quote:

Originally posted by relenakat
makes sense but what's wrong with the script-like what makes it move meh off screen?
No onwalls?

relenakat 02-21-2002 12:33 PM

Quote:

Originally posted by Python523

No onwalls?

no walls period in my levels

DeathChill 02-21-2002 11:15 PM

No..That weapon wasn't scripted by him...That's a staff NPC off the Shadow Dragons site...So sad that he tried to steal it :/


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

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