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 01-23-2006, 06:17 AM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
Stumped

I'm a bit stumped as to how to get gani's to show in one certain level, but when you enter another, the default gani's show...any suggestions?
__________________

Reply With Quote
  #2  
Old 01-23-2006, 06:22 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
ganis for what?

Explain more about what you're trying to do...
Reply With Quote
  #3  
Old 01-23-2006, 06:24 AM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
Basically, my overworld, when you enter the overworld levels "worldmap_" it is supposed to change your gani's to a specific gani. And when you leave off the overworld, it should change your gani's back to your default walk, idle, etc.
__________________

Reply With Quote
  #4  
Old 01-23-2006, 07:11 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
check the level you're in, and then use replaceani?
__________________
Reply With Quote
  #5  
Old 01-23-2006, 07:15 AM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
This is what I have

NPC Code:
//#CLIENTSIDE
if (created || timeout) {
if (startswith(worldmap_,#L)) {
setani yen-mini-idle,;
replaceani idle,yen-mini-idle;
replaceani walk,yen-mini-walk;
replaceani sit,yen-mini-idle;
replaceani swim,yen-mini-idle;
replaceani sleep,yen-mini-idle;
replaceani sword,yen-mini-idle;
replaceani push,yen-mini-idle;
replaceani pull,yen-mini-idle;
replaceani lift,yen-mini-idle;
replaceani hurt,yen-mini-idle;
replaceani grab,yen-mini-idle;
}
}



And that sets the gani's when I enter that level, but if i exit to another level, I need the gani's to set back to the original idle, walk, etc.
__________________

Reply With Quote
  #6  
Old 01-23-2006, 07:25 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
This should help without giving out the whole answer.

Let's say you changed the idle gani with replaceani. To set it back to default do:

PHP Code:
replaceani idle,idle
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #7  
Old 01-23-2006, 07:28 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
The script is called on creation, thus the reason why it's changing (or it's rather an illusion) when you enter the level. You are using a timeout loop that you never defined so the if (timeout) part will never be called. Try using
if (created || playerenters)
instead.
__________________
Reply With Quote
  #8  
Old 01-23-2006, 07:28 AM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
That's not helping me, How do I set it when i leave that level. Do I have to put an NPC in every level outside of the worldmap_ that sets the gani's, but then wouldn't that interfere with NPC's? Isn't there a way that if (created || timeout) <insert the rest of that script above, then at the end some how impliment a "else -blah-"?
__________________

Reply With Quote
  #9  
Old 01-23-2006, 07:39 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Why are you using a timeout if you're not even setting the timeout? -.-
Check for
if (created || playerenters) {}
then check to see what level the player is in and replace with the respective ganis.
__________________
Reply With Quote
  #10  
Old 01-23-2006, 07:43 AM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
I changed it to the playerenters and such, but when I leave the world map, I am still using the gani that it made me use on the world map...
__________________

Reply With Quote
  #11  
Old 01-23-2006, 11:57 AM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Couldn't you replace timeout with timereverywhere?
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #12  
Old 01-23-2006, 12:41 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Raeiphon
Couldn't you replace timeout with timereverywhere?
That's deprecated. Also, it wouldn't solve this problem if it was not deprecated. Please do not post bad advice.
Reply With Quote
  #13  
Old 01-23-2006, 12:42 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by RavenofEarth
I changed it to the playerenters and such, but when I leave the world map, I am still using the gani that it made me use on the world map...
Did you add a code block for resetting the animations? 'Cause it's kinda silly to expect it to happen without you specifying that it ought to.
Reply With Quote
  #14  
Old 01-23-2006, 12:53 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
No where in your code does it say that it would reset the animation, so why would you expect it to? -.- Try using an elseif statement and resetting the animation below that.
__________________
Reply With Quote
  #15  
Old 01-23-2006, 04:01 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Quote:
Originally Posted by Lance
That's deprecated. Also, it wouldn't solve this problem if it was not deprecated. Please do not post bad advice.
I was asking.

And instead of double posting, ever heard of edit?
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #16  
Old 01-23-2006, 04:27 PM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally Posted by Raeiphon
And instead of double posting, ever heard of edit?
Ever heard of tree structure? Read the rules.
Reply With Quote
  #17  
Old 01-23-2006, 05:17 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by RavenofEarth
That's not helping me, How do I set it when i leave that level. Do I have to put an NPC in every level outside of the worldmap_ that sets the gani's, but then wouldn't that interfere with NPC's? Isn't there a way that if (created || timeout) <insert the rest of that script above, then at the end some how impliment a "else -blah-"?
HTML Code:
if (created || playerenters) { // This event is triggered every time a player enters a level.
  if (startswith(worldmap_,#L)) {
    /* player has entered a level that begins with worldmap_ */
  }
  else {
    /* player has entered a level that does not begin with worldmap_ */
  }
}
The block of code within an else (after an if statement) will be executed if that if statement is false.
Reply With Quote
  #18  
Old 01-23-2006, 06:00 PM
RavenofEarth RavenofEarth is offline
Registered User
RavenofEarth's Avatar
Join Date: Jan 2005
Posts: 86
RavenofEarth is on a distinguished road
Send a message via AIM to RavenofEarth
See, I knew one thing, but I wasn't sure how it was to be set up. the elseif worked, appreciate it.
__________________

Reply With Quote
  #19  
Old 01-24-2006, 12:06 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Raeiphon
I was asking.

And instead of double posting, ever heard of edit?
Ever heard of "read the forum rules" or "there are other types of view modes than linear"?

Well, I guess you have since Jordan already posted it.

Tip: don't tell a moderator how to post.
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 06:24 PM.


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