Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-25-2001, 08:56 AM
hendelbroadaxe hendelbroadaxe is offline
Registered User
Join Date: Sep 2001
Posts: 65
hendelbroadaxe is on a distinguished road
jumping npc

i need a little help with this script all i need added to it is the onwall script to keep them from going over stuff like trees buildings etc.

if (playerenters) {
}
if (playertouchsme) {toweapons jump;
}

if (weaponfired) {
freezeplayer 1.5;playery-=1;sleep .1;
playery-=1;sleep .1;playery-=1;sleep .1;
playery-=1;sleep .1;playery-=1;sleep .1;
playery-=1;sleep .1;playery-=1;sleep .1;playery-=1;sleep .1;playery+=1;sleep .1;playery+=1;
sleep .1;playery+=1;sleep .1;playery+=1;sleep .1;
playery+=1;sleep .1;
playery+=1;sleep .1;
playery+=1;sleep .1;
playery+=1;sleep .1;}

if you can improve on it or think you can do it better than by all means do. thanks for any help with this.
__________________
Horny=Pleasure | Pleasure=Tight ***** | Tight *****=Satisfied
[img]http://rick.*******ers.net/sr/users/~lost/nick1.jpg[/img]
Click My Sig!
Reply With Quote
  #2  
Old 09-25-2001, 09:42 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
make it not go through walls?
Reply With Quote
  #3  
Old 09-25-2001, 09:54 AM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
Jadis:

¡ES IMPOSIBLE!
Reply With Quote
  #4  
Old 09-25-2001, 10:14 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
its not impossible to make it go up but not through walls
Reply With Quote
  #5  
Old 09-25-2001, 10:51 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
ive seen it done
Reply With Quote
  #6  
Old 09-25-2001, 11:06 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
if (onwall)
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
Reply With Quote
  #7  
Old 09-25-2001, 08:42 PM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
?????????????/
Reply With Quote
  #8  
Old 09-26-2001, 02:18 AM
Sep3kP2P Sep3kP2P is offline
Registered User
Join Date: Aug 2001
Location: CT
Posts: 183
Sep3kP2P is on a distinguished road
Send a message via ICQ to Sep3kP2P Send a message via AIM to Sep3kP2P
...crap

one, there are no for loopswhivch would make that 10x smaller, two an onwall detection for that is really pretty easy
__________________
Sephiroth2k - Co-Owner Of Dragon Quest (Look In Profile For Website)
Reply With Quote
  #9  
Old 09-26-2001, 02:19 AM
Sep3kP2P Sep3kP2P is offline
Registered User
Join Date: Aug 2001
Location: CT
Posts: 183
Sep3kP2P is on a distinguished road
Send a message via ICQ to Sep3kP2P Send a message via AIM to Sep3kP2P
also you used sleep .1, if anything use .05, it makes it look less jumpy
__________________
Sephiroth2k - Co-Owner Of Dragon Quest (Look In Profile For Website)
Reply With Quote
  #10  
Old 09-26-2001, 02:20 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
ew
Reply With Quote
  #11  
Old 09-26-2001, 02:22 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
lol i think he wanted it to be jumpy.
Reply With Quote
  #12  
Old 09-26-2001, 02:28 AM
Sep3kP2P Sep3kP2P is offline
Registered User
Join Date: Aug 2001
Location: CT
Posts: 183
Sep3kP2P is on a distinguished road
Send a message via ICQ to Sep3kP2P Send a message via AIM to Sep3kP2P
lol

nonono lol i meant jumpy as in not smooth =) wiseguy...
__________________
Sephiroth2k - Co-Owner Of Dragon Quest (Look In Profile For Website)
Reply With Quote
  #13  
Old 09-26-2001, 02:30 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
lol so its not like floating HAHAHA lol like a falling napkin
Reply With Quote
  #14  
Old 09-26-2001, 02:30 AM
EdgeP2P EdgeP2P is offline
Registered User
Join Date: Sep 2001
Location: OHio,Lima
Posts: 363
EdgeP2P is on a distinguished road
yehda
__________________

[IMG]http://rick.*******ers.net/ss/users/rone/Sig2.jpg[/IMG]
I haven't failed. I've just found 10,000 ways that don't work.
Reply With Quote
  #15  
Old 09-26-2001, 02:32 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
lol noone is answering this guys question just talking about it
Reply With Quote
  #16  
Old 09-26-2001, 02:33 AM
EdgeP2P EdgeP2P is offline
Registered User
Join Date: Sep 2001
Location: OHio,Lima
Posts: 363
EdgeP2P is on a distinguished road
lol
__________________

[IMG]http://rick.*******ers.net/ss/users/rone/Sig2.jpg[/IMG]
I haven't failed. I've just found 10,000 ways that don't work.
Reply With Quote
  #17  
Old 09-26-2001, 02:41 AM
hendelbroadaxe hendelbroadaxe is offline
Registered User
Join Date: Sep 2001
Posts: 65
hendelbroadaxe is on a distinguished road
hahaha geez all i need is the onwall added to it so they can't get on buildings or through doors or to certain spots there not suppose to get too.

it has to be jumpy like it is now. not smooth like there doing some matrix deal.
__________________
Horny=Pleasure | Pleasure=Tight ***** | Tight *****=Satisfied
[img]http://rick.*******ers.net/sr/users/~lost/nick1.jpg[/img]
Click My Sig!
Reply With Quote
  #18  
Old 09-26-2001, 02:45 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
simple linear jumping

NPC Code:

//jump height
this.jumpheight=16;

if (playertouchsme) {
//add weapon
toweapons jump;
say2 jump! hit S to flip;
}

if (weaponfired) {
//disable movement
disabledefmovement;
//set sprite
playersprite=30;
//make jump count
this.jumpcount=this.jumpheight-1;
//show shadow img
showimg 100,charshadow.gif,playerx+.5,playery+1.5;
changeimgvis 100,0;
//start loop
while (this.jumpcount>(this.jumpheight-(this.jumpheight*2))) {
//flip
//check key
if (keydown(5)&&this.jumpcount>0&&this.flip=0) {
//set flip
this.flip=1;
//set flip count
this.flipcount=0;
}
if (this.flip=1&&this.flipcount<4) { playerdir=(playerdir+1)%4; this.flipcount++; }
if (this.flipcount>=4) { this.flip=0; }
//end flip
//check onwall and move player
if (!onwall(playerx+1.5,playery-this.jumpcount/this.jumpheight)) {
playery-=this.jumpcount/this.jumpheight;
}
else {
if (this.jumpcount>=0) {
putleaps 2,playerx+1,playery;
this.jumpcount-=this.jumpcount*2;
}
}
//end checkwall and move
//add to counter
this.jumpcount-=1;
//sleep
sleep .1;
//re run loop
}
//hide
hideimg 100;
//reset variables
this.flip=0;
//reset sprite
playersprite=0;
//re-enable movement
enabledefmovement;
}

__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #19  
Old 09-26-2001, 02:46 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
and liquid ice saves the day
Reply With Quote
  #20  
Old 09-26-2001, 02:48 AM
EdgeP2P EdgeP2P is offline
Registered User
Join Date: Sep 2001
Location: OHio,Lima
Posts: 363
EdgeP2P is on a distinguished road
YAY!
__________________

[IMG]http://rick.*******ers.net/ss/users/rone/Sig2.jpg[/IMG]
I haven't failed. I've just found 10,000 ways that don't work.
Reply With Quote
  #21  
Old 09-26-2001, 02:52 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by EdgeP2P
YAY!
kid u gotta stop spamming u have like every single topic (not thread)
wit ur name rite now (not ne more hahahah)
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #22  
Old 09-26-2001, 02:52 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
EDGE YUO = ***GOT,
stop spamming.
Reply With Quote
  #23  
Old 09-26-2001, 05:55 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Merlin
EDGE YUO = ***GOT,
stop spamming.
go eat joor cheeze and dont drop the flag again *smacks*
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:11 AM.


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