Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-04-2010, 10:41 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
onwater()

So i have this script, and without onwater it works fine (I use it for birds), but when i put onwater in, the damn fish doesnt move period. :/

PHP Code:
function onCreated() {
  
setCharani("armageddon-fish_bass",NULL);
}
//#CLIENTSIDE
function onCreated() {
  
setTimer(0.05);
  
drawoverplayer();
  
dontblocklocal();
  
this.= -1;
}
function 
move() {
  
this.return = int(random(0,50));
  if(
this.return > 45) {
   if (
onwater(this.x+1.5,this.y+2)) {
     
this.dir this.dir int(random(-1,1));
     if (
this.dir 3) {
       
this.dir 0;
     }
     if (
this.dir 0) {
       
this.dir 3;
     }
     
this.this.dir;
  }
  
this.dir this.i;
  
this.+= vecx(this.i) / this.speed;
  
this.+= vecy(this.i) / this.speed;
 }

function 
onTimeout() {
  
checks();
  
move();
  
setTimer(0.05);

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 06-04-2010, 10:53 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Which tileset type are you using?
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 06-04-2010, 11:11 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
based off pics0 so i guess type 0.

Its kind of on topic, in a way now, so I'll go ahead an ask another question. Trying to find out the tile location, like 0x3AB or whatever, so I can do a movement system of sorts, but this isnt working either, tried it clientside and serverside.

PHP Code:
function OnMouseDown() {
    
player.chat tiles[mousex,mousey];

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #4  
Old 06-04-2010, 11:13 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Move is a preexisting function :P Try renaming it.

Also, you can just do something like this:
PHP Code:
function MoveFish() {
  if (!
onwater(this.x+1.5,this.y+2)) return;
  
this.return = int(random(0,50));
  if(
this.return > 45) {
    
// stuff
  
}

'return' will stop the function immediately.

Also, it may be a problem with some sort of level thing... I doubt it, but try something like:
this.level.onwater(x,y);
Reply With Quote
  #5  
Old 06-04-2010, 11:21 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by DustyPorViva View Post
Move is a preexisting function :P Try renaming it.

Also, you can just do something like this:
PHP Code:
function MoveFish() {
  if (!
onwater(this.x+1.5,this.y+2)) return;
  
this.return = int(random(0,50));
  if(
this.return > 45) {
    
// stuff
  
}

'return' will stop the function immediately.

Also, it may be a problem with some sort of level thing... I doubt it, but try something like:
this.level.onwater(x,y);
Neither works.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #6  
Old 06-04-2010, 11:44 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Have you considered using the built-in move? I know this probably doesn't fix your current problem but just something that could benefit you down the line.

Here's a little example of what's possible:

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
showcharacter();
  
setTimer(0.05);
}

function 
onTimeout() {
  
// Move to a random location in 2 seconds.
  
moveTo(random(064), random(064), 2);
  
// Wait till movement complete
  
waitfor(this"MovementFinished");
  
// Continue looping
  
setTimer(0.05);
}

function 
moveTo(txtytime) {
  
// Determine Movement Deltas (Final take away Initial)
  
temp.dx tx this.x;
  
temp.dy ty this.y;
  
// Set New Direction
  
this.dir getdir((this.dx) - this.x,(this.dy) - this.y);
  
// Set Movement Animation
  
setcharani("walk""");
  
// Move (The 8 at the end is so the MovementFinished event is called)
  
move(temp.dxtemp.dytime8);
}

function 
onMovementFinished() {
  
setcharani("idle""");

__________________
Quote:
Reply With Quote
  #7  
Old 06-04-2010, 11:59 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I was thinking of it, but was just trying to get onwater to work first. Have crabs that use that.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #8  
Old 06-05-2010, 01:18 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Try: onwater(this.x%64+1.5,this.y%64+2)
Reply With Quote
  #9  
Old 06-05-2010, 01:29 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Still the same. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 06-05-2010, 05:11 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by sssssssssss View Post

Its kind of on topic, in a way now, so I'll go ahead an ask another question. Trying to find out the tile location, like 0x3AB or whatever, so I can do a movement system of sorts, but this isnt working either, tried it clientside and serverside.

PHP Code:
function OnMouseDown() {
    
player.chat tiles[mousex,mousey];

Any ideas onthis?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #11  
Old 06-05-2010, 05:32 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
Any ideas onthis?
What does it do? It should give you a number (not in hexadecimal though).
__________________
Reply With Quote
  #12  
Old 06-05-2010, 07:07 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It does nothing. No player chat or anything.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #13  
Old 06-05-2010, 07:18 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by sssssssssss View Post
It does nothing. No player chat or anything.
It's may be case-sensitive, try:

PHP Code:
//#CLIENTSIDE
function onMouseDown() {
  
player.chat tiles[int(mousex), int(mousey)];

or even

PHP Code:
//#CLIENTSIDE
function GraalControl.onMouseDown() {
  
player.chat tiles[int(mousex), int(mousey)];

__________________
Quote:
Reply With Quote
  #14  
Old 06-05-2010, 07:20 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Floating points definitely don't matter for tiles[x,y] by the way.
Reply With Quote
  #15  
Old 06-05-2010, 08:52 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Ok, so i didnt even realize the on was cap, works fine.

Im trying to get the tile location though, and it doesnt seem thats right. How would I put player.chat to the tile location?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #16  
Old 06-05-2010, 08:55 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by sssssssssss View Post
Im trying to get the tile location though, and it doesnt seem thats right. How would I put player.chat to the tile location?
What do you mean by the tile location? Do you mean which tile is being displayed at a given (x,y)?
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #17  
Old 06-05-2010, 08:56 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I mean like the 0CxC39 stuff. or is the x,y good enough to do a movement sys with?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #18  
Old 06-05-2010, 09:01 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by sssssssssss View Post
Ok, so i didnt even realize the on was cap, works fine.
I suspected that, but I never brought it up

To get the hex codes for tiles you need to use the external editor. Open it up and lay the tiles you want, highlight them and then click the button on the top that looks like a circle with a cross in it. Graal will convert these to integers(numbers) in gscript though, hence why tiles[x,y] return numbers instead. They're all the same, though.
Reply With Quote
  #19  
Old 06-05-2010, 09:35 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
so i could use tiles[x,y] the same way, if i wanted to?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #20  
Old 06-05-2010, 09:42 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by sssssssssss View Post
so i could use tiles[x,y] the same way, if i wanted to?
Yup./
Reply With Quote
  #21  
Old 06-05-2010, 09:48 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
coo, lol. thanks.


As for the onwater part of my question, is it just that it should work and its just not?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #22  
Old 06-05-2010, 10:13 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
try onwater2() and see if makes any difference? (sorry if someone already suggested this, I didn't read the whole thread)
__________________
Reply With Quote
  #23  
Old 06-05-2010, 10:16 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I tried with 1,1 onwater2, did the same thing. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #24  
Old 06-05-2010, 10:38 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
I tried your code on my server (using new tileset type, though) and it worked fine.

Just curious, are you defining this.speed anywhere? You said it works fine without the onWater() check, but I don't see this.speed set anywhere in your post. (dividing by zero is bad and would cause this not to work!)
__________________
Reply With Quote
  #25  
Old 06-05-2010, 11:44 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by salesman View Post
I tried your code on my server (using new tileset type, though) and it worked fine.

Just curious, are you defining this.speed anywhere? You said it works fine without the onWater() check, but I don't see this.speed set anywhere in your post. (dividing by zero is bad and would cause this not to work!)
Most likely, but like I said: Works on the birds just fine. Maybe this.speed is the reason, I will try w/o it.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #26  
Old 06-05-2010, 11:55 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by sssssssssss View Post
Most likely, but like I said: Works on the birds just fine. Maybe this.speed is the reason, I will try w/o it.
or just make sure you're giving it a value, because you're not in your example.
__________________
Reply With Quote
  #27  
Old 06-06-2010, 12:25 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
in my ex. i thought the onwater was in working, if its not, plz point out the problem.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #28  
Old 06-07-2010, 03:11 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by salesman View Post
or just make sure you're giving it a value, because you're not in your example.
My example is the entire code. So im def not, but like i said, works with the birds.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #29  
Old 06-07-2010, 04:25 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by sssssssssss View Post
My example is the entire code. So im def not, but like i said, works with the birds.
You cannot divide by zero. Your code will not work until you give this.speed a value. Well, you can, your fish just wont move anywhere =p
__________________
Reply With Quote
  #30  
Old 06-07-2010, 05:22 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by salesman View Post
You cannot divide by zero. Your code will not work until you give this.speed a value. Well, you can, your fish just wont move anywhere =p
Thats just rude. If you want to put your foot in your mouth I'll give u rc on armageddon for a second, u look at the class, then Ill show you a bird flying around with it.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #31  
Old 06-07-2010, 05:36 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by sssssssssss View Post
Thats just rude. If you want to put your foot in your mouth I'll give u rc on armageddon for a second, u look at the class, then Ill show you a bird flying around with it.
I'm just trying to help. I copied and pasted your code on my server, set this.speed to 1, and it worked fine.

I don't see why you're being so stubborn, saying that "well, it works for birds" instead of just fixing the problem I showed you? If you did set this.speed to 1, and it's still not working, then your problem might not be in the code and there is something else conflicting. With the way you've responded though, I'm getting the feeling that you haven't even tried it yet.
__________________
Reply With Quote
  #32  
Old 06-07-2010, 05:46 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Sales is correct.



PHP Code:
this.+= vecx(this.i) / this.speed
this.+= vecy(this.i) / this.speed
First, you should multiply by the speed

PHP Code:
this.+= vecx(this.i) * this.speed
this.+= vecy(this.i) * this.speed
And then just set "this.speed" in the onCreated event.
__________________
Reply With Quote
  #33  
Old 06-07-2010, 05:51 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by sssssssssss View Post
Most likely, but like I said: Works on the birds just fine. Maybe this.speed is the reason, I will try w/o it.
Quote:
Originally Posted by sssssssssss View Post
I will try w/o it.
I took it out, it did absolutely nothing being there.
Also, I knew you couldnt divide by zero, i was simply saying it didn't apparently matter much, because the bird works fine. Dont know how, but it does.

dunno how yours works sales, b/c mine just moves anywhere it pleases, water or not.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #34  
Old 06-07-2010, 05:53 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
I took it out, it did absolutely nothing being there.
Also, I knew you couldnt divide by zero, i was simply saying it didn't apparently matter much, because the bird works fine. Dont know how, but it does.
Add me RC on your server and I guarantee I can find 'this.speed' being defined in the birds.
__________________
Reply With Quote
  #35  
Old 06-07-2010, 05:54 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by sssssssssss View Post
in my ex. i thought the onwater was in working, if its not, plz point out the problem.
Quote:
Originally Posted by sssssssssss View Post
if its not, plz point out the problem.
Next time I won't bother trying to help you
__________________
Reply With Quote
  #36  
Old 06-07-2010, 05:58 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Lol sales, I told u I'd try taking it out. -_- Sorry i got like that, guess i read what you were saying wrong unless you were just intending to be rude, but I did clearly say i'd take it out, and I tried that.

onwater still doesnt work.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #37  
Old 06-07-2010, 06:04 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by sssssssssss View Post
Lol sales, I told u I'd try taking it out. -_- Sorry i got like that, guess i read what you were saying wrong unless you were just intending to be rude, but I did clearly say i'd take it out, and I tried that.

onwater still doesnt work.
I wasn't intending to be rude, and I'm sorry if it came out that way...if onwater() still doesn't work, I have no clue what else to tell you.

I had a problem with projectile collision because I forgot to set newtilesets=true in the server options (it could be something stupid like that).
__________________
Reply With Quote
  #38  
Old 06-07-2010, 06:08 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
:/ tried. probably a good thing to have true though.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:44 AM.


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