Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   hitobjects (https://forums.graalonline.com/forums/showthread.php?t=70560)

xAndrewx 12-03-2006 11:45 AM

hitobjects
 
Doesn't seem to work with bushes?

HTML Code:

function onMouseDown()
{
  putleaps(2, mousex - 0.5, mousey - 0.5); 
  hitobjects(1, mousex, mousey);
}

Doesn't seem to want to destroy any bush I click >:[

Yen 12-04-2006 12:09 AM

o-o
It triggers 'onWas Hit()' on the NPC/player.. It's not made to break bushes..

And while we're on the topic, onWas Hit() is only serverside.

Minus the space, of course.

xAndrewx 12-04-2006 09:14 AM

Quote:

Originally Posted by Yen (Post 1249814)
o-o
It triggers 'onWas Hit()' on the NPC/player.. It's not made to break bushes..

And while we're on the topic, onWas Hit() is only serverside.

Minus the space, of course.

So what can be used to break bushes then =O

excaliber7388 12-04-2006 03:26 PM

Using put leaps, and update board would work, I assume.
You could also replace the sword gani and use S or Space.

Chompy 12-04-2006 03:40 PM

Quote:

Originally Posted by xAndrewx (Post 1250051)
So what can be used to break bushes then =O

PHP Code:

function onCreated()
  
setTimer(0.05);

function 
onTimeout() {
  if (
player.ani == "sword") {
    
setani("punch"NULL);
    
freezeplayer(0.24);
  }
  
setTimer(0.05);


That would play the 'punch' gani instead of 'sword',
and still crush brushes. If you change the setTimer(0.05)
to something else, it will play sword in a very short moment,
then play the wanted gani, so .05 would be best.

Magadal 12-04-2006 04:12 PM

Quote:

Originally Posted by Chompy (Post 1250095)
PHP Code:

function onCreated()
  
setTimer(0.05);

function 
onTimeout() {
  if (
player.ani == "sword") {
    
setani("punch"NULL);
    
freezeplayer(0.24);
  }
  
setTimer(0.05);


That would play the 'punch' gani instead of 'sword',
and still crush brushes. If you change the setTimer(0.05)
to something else, it will play sword in a very short moment,
then play the wanted gani, so .05 would be best.

What the hell. I hope you know that theres still the replaceani command?Oo

Chompy 12-04-2006 05:58 PM

Quote:

Originally Posted by Magadal (Post 1250101)
What the hell. I hope you know that theres still the replaceani command?Oo

replaceani is weird :]

xAndrewx 12-04-2006 09:28 PM

So there isn't anything other than ''sword.gani'' to destroy bushes? Nah, you're playin'

Loriel 12-04-2006 09:51 PM

Quote:

Originally Posted by xAndrewx (Post 1250202)
So there isn't anything other than ''sword.gani'' to destroy bushes? Nah, you're playin'

What are bushes? Levels do not contain bushes. Swords do not interact with any bush objects. They never have.

Yen 12-04-2006 11:26 PM

The only way to cut up bush tiles is by hitting the S button or replacing their tiles. :(

xAndrewx 12-05-2006 09:29 AM

Quote:

Originally Posted by Yen (Post 1250241)
The only way to cut up bush tiles is by hitting the S button or replacing their tiles. :(

that's pathetic. Serverside gani's it is.^^

Loriel 12-05-2006 09:53 PM

Quote:

Originally Posted by Yen (Post 1250241)
The only way to cut up bush tiles is by replacing their tiles. :(

I would have gotten to that :mad:


All times are GMT +2. The time now is 07:35 AM.

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