Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 09-12-2010, 08:27 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Not meaning to revive this thread, but out of curiosity, why does this baddy not move unless on the default pics1.png tileset? I tested this on a type 1 tileset and the baddy would not move. With the same code, I tried it on the default tileset, it worked fine. I also have a custom HP system in play. When the baddy attacks the player, it subtracts from player.hearts, not the clientr var I set it to. wutdo?
Reply With Quote
  #17  
Old 09-12-2010, 08:29 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by devilsknite1 View Post
Not meaning to revive this thread, but out of curiosity, why does this baddy not move unless on the default pics1.png tileset? I tested this on a type 1 tileset and the baddy would not move. With the same code, I tried it on the default tileset, it worked fine. I also have a custom HP system in play. When the baddy attacks the player, it subtracts from player.hearts, not the clientr var I set it to. wutdo?
The script does not recognize the levels tiletype unless you add the level to serveroptions like this:

PHP Code:
newtilesetlevels=mal_blobbowl.nw,exampleheader_ 
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #18  
Old 09-12-2010, 09:08 PM
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
You can also do newtilesets=true if your entire server uses a type 1 tileset.
__________________
Reply With Quote
  #19  
Old 09-15-2010, 11:18 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Quote:
Originally Posted by cbk1994 View Post
You can also do newtilesets=true if your entire server uses a type 1 tileset.
Quote:
Originally Posted by xXziroXx View Post
The script does not recognize the levels tiletype unless you add the level to serveroptions like this:

PHP Code:
newtilesetlevels=mal_blobbowl.nw,exampleheader_ 
Thanks to both of you!
Now it still subtracts from player.hearts, when that's not defined anywhere... Any ideas?
Reply With Quote
  #20  
Old 09-15-2010, 11:24 PM
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 devilsknite1 View Post
Thanks to both of you!
Now it still subtracts from player.hearts, when that's not defined anywhere... Any ideas?
Classic hit detection is a bit peculiar. It loops through all GANIs in the level and looks for the "sword" gani, and if it's present and in position to hit the player, the player's hearts are subtracted.

The easiest solution is just to make a new GANI named "myserver_sword.gani" (which is a clone of sword.gani) and use this in place of "sword".
__________________
Reply With Quote
  #21  
Old 09-16-2010, 06:39 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 cbk1994 View Post
The easiest solution is just to make a new GANI named "myserver_sword.gani" (which is a clone of sword.gani) and use this in place of "sword".
I imagine replaceani("sword", "reallyobscureswordgani"); would do the trick as well. (Ez Classic Spar God Mode?)

I remember at one point doing: replaceani("sword", "idle"); caused NPCs to 'attack' you if you touched them that was a good laugh.
__________________
Quote:
Reply With Quote
  #22  
Old 09-16-2010, 06:41 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
I released version 3 of the GBaddy not that long ago (you can find it here). Just figure I'd point that out in case you didn't notice since you should be using the most recent version of the script before changing it around.

As for wanting the baddy to work with custom systems, you would have to make alterations to the damagePlayer() function (particularly the setcharani("sword", ""); line). You can place your custom health variable under that line and it should deduct straight from it but the system will still remove from player.hearts due to the baddy using sword.gani, so you'll need to address that. The onCounter() event also uses a setcharani("sword", ""); line so keep that in mind as well.

Edit: Looking back at it, the script as a whole could use a complete overhaul (especially with there being a lot of redundancy), but investing anymore time in it would be a waste; nonetheless, it's complete enough for what it's worth--a learning tool to help get you started, not something to be used on a server without major modifications.

Last edited by Gambet; 09-16-2010 at 06:56 AM..
Reply With Quote
Reply


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 11:24 PM.


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