Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-30-2011, 02:37 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Sizing HELP

im makeing a baddie and im trying to make him easier to hit. so i want to increase the size of him (the "hit box"). i think thats what you call it.

How do i increase the size of this?
Reply With Quote
  #2  
Old 07-30-2011, 05:08 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 Send a message via Skype™ to ffcmike
If you use
Graal Script Code:
setshape(1widthinpixelsheightinpixels);
//for instance: this.setshape(1, 48, 48); 
this will set the blocking shape size of the NPC, then you could for instance re-adjust any ganis for the shape to be centred.
Unfortunately using showcharacter(); enforces a blocking shape of 32 x 32 pixels offset by 0.5 x and 1 y (same as players).
Reply With Quote
  #3  
Old 07-30-2011, 05:31 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
i tried it but it still seems like i have to be just as close to dmg the baddie as it was default, i tried it different ways to and put the number way up :/
Reply With Quote
  #4  
Old 07-30-2011, 05:37 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 Send a message via Skype™ to ffcmike
Quote:
Originally Posted by greggiles View Post
i tried it but it still seems like i have to be just as close to dmg the baddie as it was default, i tried it different ways to and put the number way up :/
Depending on whether the baddy is serverside or clientside, are you trying this on whatever is relevant to receiving the default damage trigger?
I'm not entirely sure how default works compared to having custom damage triggers though, you may need to set the shape both clientside and serverside if it's a serverside baddy.

And are you sure showcharacter(); is not being used?
If it is, this is forcing a shape of 32 x 32 pixels, which even setshape cannot modify.
Reply With Quote
  #5  
Old 07-30-2011, 05:38 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
actually i figured it out. THANKS
Reply With Quote
  #6  
Old 07-30-2011, 06:52 PM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
Thanks for not telling us what the problem was.
__________________
Reply With Quote
  #7  
Old 07-30-2011, 08:13 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
Quote:
Originally Posted by greggiles View Post
actually i figured it out. THANKS
Given that the forums is one of the most helpful resources for scripting, it really helps to let us know what you did to solve your problem.

So in the event someone else experiences the same problem, they'll be able to see your solution.
__________________
Quote:
Reply With Quote
  #8  
Old 07-30-2011, 10:28 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
to fix it you HAVE to make sure showcharacter(); is not in the script. then it should work fine
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 07:28 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.