Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   walking on wall? (https://forums.graalonline.com/forums/showthread.php?t=24444)

XeroMaster 02-24-2002 05:13 AM

walking on wall?
 
is there a script it make you walk on a wall, but not all the walls

like just 1 tile peace?
so you can walk on tiles
2,132
3,132
4,132
2,133
3,133
4,133

thanks for your help

TDO2000 02-24-2002 05:39 AM

put the values of the tiles you want to be walkable in an array
use board or tiles[] with vexy and vecy to get the tiles in front of the player... and check with in if these tiles are in the array... if they are move the player on it...

XeroMaster 02-24-2002 05:42 AM

?
 
what?

i dont under stand vecy/vexy things
could you explain?

TDO2000 02-24-2002 05:50 AM

um...

it gives u the value you have to add or substract to do movement to one of the 4 specified dirs:

dir 0 (up)
vecx(0) = 0
vecy(0) = -1

dir 1 (left)
vecx(1) =-1
vecy(1) = 0

dir 2 (down)
vecx(2)=0
vecy(2)=1

dir 3 (right)
vecx(3)=1
vecy(3)=0

so that means if u use playerdir instead of the numbers
x=playerx+vecx(playerdir);
y=playery+vecy(playerdir);

will always give u the tile 1 field in front of the player

to get it exactly in the middle front of the player u have to add 1.5 to x and 2 to y:

x=playerx+1.5+vecx(playerdir);
y=playery+2+vecy(playerdir);

XeroMaster 02-24-2002 06:02 AM

I am not new at scripting
 
I just dont know lot about tiles

all i know how to do with them is change them with
addtiledef2 img.pmg,level.nw,0,0;

Python523 02-24-2002 06:22 AM

Kai is right, don't even try this if you don't know a lot about scripting

XeroMaster 02-24-2002 06:26 AM

can some just script the script for me then?

i want to be able to walk on these tiles

2,132
3,132
4,132
2,133
3,133
4,133


thanks

TDO2000 02-24-2002 06:55 AM

Is there a way you first have to read the guildline before entering the forums??????

neomaximus2k 02-24-2002 07:49 AM

Quote:

Originally posted by Kaimetsu


Unfortunately not :(

it would be good for a futture mod for the board tho. i may script it perhaps.

and i never understood the tile scripting either and people consider me to be a l33t scripter.

XeroMaster 02-24-2002 08:54 AM

I am
 
a good scripter.....
I just dont get the tile things!!!
Some one say this is a place to teach people things..

so could some explain how?
some one tryed but all he talked about was vexy and vexy's

I dont understand these things!!!
But I am NOT a BAD scripter!

I have mostly learned scripting from scripts.
I download all types of scripts and learn from them..
just to let you know

TDK_RC6 02-24-2002 11:42 AM

Quote:

Originally posted by Kaimetsu
If you're new to scripting then you probably shouldn't try this :-/
exactly

TDO2000 02-24-2002 06:22 PM

Re: I am
 
Quote:

Originally posted by XeroMaster
a good scripter.....
I just dont get the tile things!!!
Some one say this is a place to teach people things..

so could some explain how?
some one tryed but all he talked about was vexy and vexy's

I dont understand these things!!!
But I am NOT a BAD scripter!

I have mostly learned scripting from scripts.
I download all types of scripts and learn from them..
just to let you know

how can you call yourself a good scripter if you don't even know about vecx vecy :rolleyes:

joseyisleet 02-24-2002 06:28 PM

-=Josey=-
Quote:

Originally posted by Kaimetsu
If you're new to scripting then you probably shouldn't try this :-/
I find this to be quite, well, wrong. Well in my case at least. I learned how to script better by setting my standard way higher then what I was capable of doing. Of course, I never posted asking for help/the script.

XeroMaster 02-24-2002 10:10 PM

this
 
is the ONLY thing i dont know

i know everything else

Lomgren 02-24-2002 11:48 PM

In your walking script (yes you must make your own), istead of using onwall(x,y) use a for loop to go through all the different tiles in the array, just set flag or something if the current tile is equal to one in the array, and use that to show for onwall.

TDO2000 02-25-2002 04:33 AM

Quote:

Originally posted by Lomgren
In your walking script (yes you must make your own), istead of using onwall(x,y) use a for loop to go through all the different tiles in the array, just set flag or something if the current tile is equal to one in the array, and use that to show for onwall.
Argh U DON'T need a for loop
there is a small word called IN

example:
NPC Code:

if (created || playerenters) {
this.testarray={1,2,3,4,5};
this.number=int(random(0,10));
if (this.number in this.testarray) message OMG YEEEEESSSS!!!;
}



nyghtGT 02-25-2002 05:37 AM

Re: Re: I am
 
Quote:

Originally posted by TDO2000


how can you call yourself a good scripter...

cause he can make explosion NPCs :D

joseyisleet 02-25-2002 05:41 AM

Re: Re: Re: I am
 
-=Josey=-
Quote:

Originally posted by nyghtGT

cause he can make explosion NPCs :D

I used to think explosion NPCs owned! ;D Of course my first NPC was of explosion that go in somewhat of an order like this:
\/
playerhere
/\
But, it went a little outside of the player. ;D I was quite proud of it for sometime.

nyghtGT 02-25-2002 06:03 AM

Re: Re: Re: Re: I am
 
Quote:

Originally posted by joseyisleet
-=Josey=-


I used to think explosion NPCs owned! ;D Of course my first NPC was of explosion that go in somewhat of an order like this:
\/
playerhere
/\
But, it went a little outside of the player. ;D I was quite proud of it for sometime.

i never liked em cause when i started playing graal all they helped me do was lag ...

joseyisleet 02-25-2002 02:46 PM

-=Josey=-
Well, not that high, lol. Say you're only capable of making an NPC weapon that layed a bomb, set your goal to make it lay all around the player in a circling motion. Stuff like that. Not just opening the Graal editor for the first time and say, "o liek ima script an npc dat makes it so u can climb on certain walls only", lol.

joseyisleet 02-25-2002 02:47 PM

Re: Re: Re: Re: Re: I am
 
-=Josey=-
Quote:

Originally posted by nyghtGT

i never liked em cause when i started playing graal all they helped me do was lag ...

Slow processor or some settings where set wrong with your Graal?

nyghtGT 02-25-2002 06:07 PM

Re: Re: Re: Re: Re: Re: I am
 
Quote:

Originally posted by joseyisleet
-=Josey=-


Slow processor or some settings where set wrong with your Graal?

the combonation of my 56k modem, 63.9 MB of RAM, and 700mhZ proccessor surely are the reason .. bubt when i play in full screen mode these slownesses disapear ...
but its a pain going back and forth using alt-tab to answers RC PM's/AIM messages and stuff like that

Frolic_RC2 02-25-2002 09:24 PM

Quote:

Originally posted by Kaimetsu


1) Josey, please don't double-post :(

2) Yes, you should make things that you stand a chance of figuring out. But if you look back you'll find that my statement was: "If you're new to scripting then you probably shouldn't try this". He doesn't stand a chance of making it on his own so he shouldn't try it. He's not gonna gain or learn anything from the attempt, he should go work on something around his own league.

3) Going to full-screen helps because of how Windows does GFX. It's not unexpected, really. If a game is dealing with the whole screen then it doesn't have to draw its own stuff or interpret mouse clicks etc.

Exclusive mode. When graal initiates it, and the new resolution and such, it gets kind of unstable.

Admins 02-25-2002 09:47 PM

Kaimetsu I think he just asked if there
is some easy way to do it, like you can
call replaceani to change the default animations.

I guess the 'easiest' way to do things like that
is to take an npc which has the same gfx like the
wall, and make it dontblock & drawunderplayer.

Another way would be to use addtiledef2 to add
new tiles (which look like the wall tiles) ontop of
some non-blocking tiles in pics1.png and then use
those tiles instead of the normal wall tiles. It will
look like normal wall but will be non-blocking.

If you want to make the wall tiles non-blocking for
all levels you have without editing them, then you
need to script your own player movement or ask
someone else for it. Some months ago I have posted
one on the 'new races' forum.

neomaximus2k 02-26-2002 03:07 PM

Quote:

Originally posted by Kaimetsu


Yeah, I know, but since there isn't an easy way I thought I should tell him so he doesn't waste his time with it. I assumed that he'd be talking about something that works on any level without editing it beforehand so he'd need to use a rescripted player movement system, which even some of the best scripters have problems with.

I dont mean to be ofensive dude but
Quote:

Yeah, I know, but since there isn't an easy way I thought I should tell him so he doesn't waste his time
Inst the idea of the forum to help him, not give him anything of ourse but to help him? what you are saying is if you dont know how to do it then go away, that isn't the idea of the forum

nyghtGT 02-27-2002 05:09 AM

Quote:

Originally posted by Kaimetsu

Our job is to provide a helping hand through problems. We aid, we assist, but we can't work magic.


XeroMaster 02-27-2002 05:49 AM

that is want i want!!!!
 
I do need help --but all people do is help me using scripting talk

but i dont get that type
such as vexy and vecy's
or Arrys

could some one also give Examples with your help

thanks


p.s. the reason I ask for YOUR scripts sometimes is because I like to learn from them....

it is easyer for me that way....

but if you will got give them to me, will you PLEASE help me


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

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