Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   re-assigning x and y (https://forums.graalonline.com/forums/showthread.php?t=13150)

nyghtGT 09-28-2001 06:24 AM

re-assigning x and y
 
is there a way, (i doubt it) ,
to make the startin x and y of a level at 32,32 ... where are 32,32 would be chnged to 0,0 like on a graph. I know they start in the top left hand corner at 0,0 but i was wonderin if there is a command to do it where its starting point is (32,32) but it appears as x and y. I am not talking about setting varibles for it ... i am asking if there is a solid command for it ... There is nothing i could really use it for but i jut wanna know ...

Shard_IceFire 09-28-2001 06:26 AM

Quote:

There is nothing i could really use it for but i jut wanna know ...
:confused:
Yeah that really makes sense...

KJS 09-28-2001 06:26 AM

Re: re-assigning x and y
 
Quote:

Originally posted by nyghtGT
is there a way, (i doubt it) ,
to make the startin x and y of a level at 32,32 ... where are 32,32 would be chnged to 0,0 like on a graph. I know they start in the top left hand corner at 0,0 but i was wonderin if there is a command to do it where its starting point is (32,32) but it appears as x and y. I am not talking about setting varibles for it ... i am asking if there is a solid command for it ... There is nothing i could really use it for but i jut wanna know ...

I couldn't really understand what you were saying??

so are you wondering if there is a command so if the player enters the level it puts them at a certain x and y?

AlexH 09-28-2001 06:28 AM

yes just use

if (playerenters) {
playerx = whatever;
playery = whatever;
}

Cybnext_Design 09-28-2001 06:32 AM

I believe what he is trying to say is that graal should be a 4 quadrant graph, not just 1.

He wants to know if there is a command that would make it into a 4 quadrant graph.

And I don't believe there is.

nyghtGT 09-28-2001 06:37 AM

ok ...
 
read below \/ \/

nyghtGT 09-28-2001 06:38 AM

thats it ...
 
Quote:

Originally posted by Cybnext_Design
I believe what he is trying to say is that graal should be a 4 quadrant graph, not just 1.

He wants to know if there is a command that would make it into a 4 quadrant graph.

And I don't believe there is.

That is what i need to know ....

nyghtGT 09-29-2001 05:14 AM

thanx
 
Quote:

Originally posted by Kaimetsu
He's just talking about moving the origin from (0,0), which is impossible.
Thanx Kai, thts all I needed to hear.

JeffTL 09-29-2001 09:03 AM

He's not talking about moving the origin from (0,0). To be technical, he's talking about redefining (0,0), which by definition is the origin.

Falcor 09-29-2001 09:07 AM

You konw that would sound intellegent if you didn just reinstate the same thing kai said with different wording and thinking waht you said was acually different.

JeffTL 09-29-2001 10:12 PM

(0,0), by definition, is always the origin, because the origin defines where (0,0) is. Imagine a player character called Zero 0 and an NPC called Origin. Origin has the following script:


NPC Code:

if(playerenters){
timeout=0.5;
setcharprop #c,Zero 0;
}
if(timeout){
if(strequals(#n,Zero 0)){
playerx=x;
playery=y;
}
timeout=0.5;
}



It should, in effect, move player with name Zero 0 to the X and Y of the NPC Origin.

JeffTL 09-29-2001 10:17 PM

Falcor, I am merely trying to state that the origin cannot be moved from 0,0 because the origin is ALWAYS 0,0.

G_yoshi 09-29-2001 11:00 PM

hehe, that is the nice thing about Megazeux. You could program for specific things where the player's position was absolute zero or the Robot's (npc) position was absolute zero...but that was only for a few things such as checking what blocks (tiles) were near or in front of.

REL to Player - relative to player
REL to Self - relative to Robot
REL to Counters (I can't remember the definition for this one >.<)

those were used more as prefixes that pre-empted the command below it.

btedji 09-30-2001 07:41 AM

you could do x-32 and y-32 which will get a coordinate is between -32 and 32

G_yoshi 09-30-2001 08:46 AM

Quote:

Originally posted by btedji
you could do x-32 and y-32 which will get a coordinate is between -32 and 32
um, no, you get x=32 and y=32. Unless you are meaning that it is the equation, x-32. Thing is, you need to know x, which can be any number.

btedji 10-01-2001 08:20 AM

64-x & 64-y = the cooridinate if there were 4 equal quadrants


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

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