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-17-2012, 11:19 PM
smokeraider smokeraider is offline
Cell Chill
smokeraider's Avatar
Join Date: Aug 2006
Location: Holland
Posts: 251
smokeraider is on a distinguished road
Send a message via AIM to smokeraider Send a message via MSN to smokeraider
horse disapears when going over another level

could someone please help me?

do you know why if you do a puthorse in 1 level
on a gmap, and you walk over to another level. that the horse disapears.
how do i fix that so it will still show?

NPC Code:

//#CLIENTSIDE
function onCreated() {
puthorse("ride.png",56,30);
}



Thanks for your input.
Reply With Quote
  #2  
Old 06-17-2012, 11:24 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
There's a typo, you're missing the 'c' in 'function'.
I'm not sure if that would solve the problem though, horses are something of an old relic, these things tend to have problems on gmaps.
Reply With Quote
  #3  
Old 06-17-2012, 11:25 PM
smokeraider smokeraider is offline
Cell Chill
smokeraider's Avatar
Join Date: Aug 2006
Location: Holland
Posts: 251
smokeraider is on a distinguished road
Send a message via AIM to smokeraider Send a message via MSN to smokeraider
Quote:
Originally Posted by ffcmike View Post
There's a typo, you're missing the 'c' in 'function'.
I'm not sure if that would solve the problem though, horses are something of an old relic, these things tend to have problems on gmaps.
no it has nothing to do with that typo.
Reply With Quote
  #4  
Old 06-17-2012, 11:28 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Could it be because of the specified coordinates being relative to the individual level part and not the entire map coordinates?
Try using puthorse("ride.png", this.x, this.y);.
Reply With Quote
  #5  
Old 06-17-2012, 11:32 PM
smokeraider smokeraider is offline
Cell Chill
smokeraider's Avatar
Join Date: Aug 2006
Location: Holland
Posts: 251
smokeraider is on a distinguished road
Send a message via AIM to smokeraider Send a message via MSN to smokeraider
Quote:
Originally Posted by ffcmike View Post
Could it be because of the specified coordinates being relative to the individual level part and not the entire map coordinates?
Try using puthorse("ride.png", this.x, this.y);.
No thats not it either.
Reply With Quote
  #6  
Old 06-17-2012, 11:42 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Then there's probably nothing wrong on your part, again built-in horses are somewhat deprecated. Even on iPhone Classic Stefan scripted custom horses.

You could try creating a custom horse spawner, which then places a horse directly on the player when touched.

You'd have to make a gani copying ridestill.gani without the players character, or experiment with making outfit appear invisible, then do something like:

PHP Code:
function onCreated(){
  
this.showcharacter();
  
this.dontblock();
  
this.horseimg "ridestill.png"//may possibly need to be clientside
  
this.setcharani("nameofgani""");
}

function 
onActionRide(){
  
this.setTimer(10);
  
this.hide();
}

function 
onTimeout(){
  
this.show();
}

//#CLIENTSIDE
function onPlayerTouchsMe(){
  
puthorse(this.horseimgplayer.xplayer.y);
  
triggeraction(this.1this.1"Ride""");
  
this.hide();

Reply With Quote
  #7  
Old 06-18-2012, 12:48 AM
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
You can't fix it. Use custom horses.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #8  
Old 06-20-2012, 02:52 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
On gmaps the horses don't work, but we were emulation horses by directly putting the player on a horse:
Add:
PHP Code:
player.horseimg "ride.png"
Remove:
PHP Code:
takeplayerhorse();
// Remove the spawned horse
for (temp.i=0temp.i<10temp.i++)
  
player.level.removehorse(temp.i); 
Reply With Quote
  #9  
Old 06-20-2012, 07:50 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Stefan View Post
On gmaps the horses don't work, but we were emulation horses by directly putting the player on a horse:
Add:
PHP Code:
player.horseimg "ride.png"
Remove:
PHP Code:
takeplayerhorse();
// Remove the spawned horse
for (temp.i=0temp.i<10temp.i++)
  
player.level.removehorse(temp.i); 
I don't think 'takeplayerhorse();' spawns a horse within the level, I would assume the manual spawned horse removal is intended for when a player dies.

There's also still the variable 'horsescount', so it's better to do:

PHP Code:
player.level.removehorse(horsescount 1); 
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 10:01 AM.


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