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 08-13-2001, 07:05 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Onwall

I feel like an idiot but I just saw a post on why onwall would work and that made me think about somthing. Can someone explain to me how onwall works?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #2  
Old 08-13-2001, 07:57 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
if (onwall(x,y)) {thestuffgoeshere;} So if the NPCs x and y coordinates are on a wall/tile that cannot be walked on...the things in the brackets occur.
__________________
the sky is falling
Reply With Quote
  #3  
Old 08-13-2001, 11:01 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Ok, the main thing i have a problem with is how would you get a whole area like that? Sorta make a block of the x and y. So say you wanted somthing to happen when a whole certain area was touched?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #4  
Old 08-13-2001, 11:12 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
Ok, the main thing i have a problem with is how would you get a whole area like that? Sorta make a block of the x and y. So say you wanted somthing to happen when a whole certain area was touched?
I dont understand...Are you looking for a certain area? Or are you just checking to see if a large chunk of land is onwall?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #5  
Old 08-14-2001, 12:28 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
I suggest you use
!onwall(x,y) to do player onwall..
player onwall kinda bothers me to make and to explain..
I dont have any examples . i had some but i dont know where it ended up..
I suggest you make an array with like .25,.5,.75,1,1.25 and then just the values for the x,y . and theres a tutorial by Ace too that explains well which tiles Graal checks for the player..
__________________
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
  #6  
Old 08-14-2001, 01:58 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
say for mining or fishing u just want the weapon to fire on a certain block of area. Thats what I mean
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 08-14-2001, 02:11 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 ownerofbabylon
say for mining or fishing u just want the weapon to fire on a certain block of area. Thats what I mean
if you just wnat like fishing in the water then you use board..
if you want mining but like on a npc u made then use triggeraction or callnpc+testnpc..

here is a code for board[] on water =)

NPC Code:

this.x=int(playerx+1.5+(vecx(playerdir)*3));
this.y=int(playery+2+(vecy(playerdir)*3));
this.canfish=board[this.x+(64*this.y)];
if (this.canfish=322) { fish code here }



322 is the index of the water tile(the swimmable one)
__________________
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
  #8  
Old 08-14-2001, 02:13 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
say for mining or fishing u just want the weapon to fire on a certain block of area. Thats what I mean
Well for that you jus wanna use board[index] to tilecheck....someone check my figures on this cause I dont got my notes on hand, and I almost never use board...but it goes like this (I think)

board[x + y*64] = bx + by*16

x and y are is the loc you want to check, and bx and by are the x and y values of the tile it returns (on the tileboard on the bottom right of the level editor)...I forget the math too...but you can use a formula to pull bx and by out of the responce it gives you...
(someone post the math?)
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #9  
Old 08-14-2001, 02:14 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Gah...or just do what liquidice said and add em up for when you check it =/ Course...if its water your checking..jus use onwater
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #10  
Old 08-14-2001, 02:23 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 Xaviar
Gah...or just do what liquidice said and add em up for when you check it =/ Course...if its water your checking..jus use onwater
yeah onwater is easier ..
but that u can use for other stuff
__________________
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 11:30 AM.


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