Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-29-2007, 08:49 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Question: Bushes

Well, I noticed that the players weapons need to be enabled for a player to destroy a bush. I've tried hitobjects(pow, x, y) and it still doesn't destroy the bush!
I don't suppose anyone else has any other solutions? I don't want to use the default enableweapons for the player.
Reply With Quote
  #2  
Old 04-29-2007, 08:57 PM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a name known to allff7chocoboknight is a name known to allff7chocoboknight is a name known to allff7chocoboknight is a name known to all
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
maybe change the gani so the player doesn't slash a sword
__________________
Reply With Quote
  #3  
Old 04-29-2007, 09:11 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Wouldn't alter anything, it's the enableweapons that destroys the bush
Reply With Quote
  #4  
Old 04-29-2007, 09:19 PM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a name known to allff7chocoboknight is a name known to allff7chocoboknight is a name known to allff7chocoboknight is a name known to all
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
i thought u wanted to destroy the bush without slashing...
why would u need to destroy bushes?
__________________
Reply With Quote
  #5  
Old 04-29-2007, 09:28 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 Chandler View Post
Well, I noticed that the players weapons need to be enabled for a player to destroy a bush. I've tried hitobjects(pow, x, y) and it still doesn't destroy the bush!
I don't suppose anyone else has any other solutions? I don't want to use the default enableweapons for the player.
Best way I can think of is to make a custom gani of a bush, with a gani script possibly.
__________________
Reply With Quote
  #6  
Old 04-29-2007, 10:21 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Which is something I don't want to do
Reply With Quote
  #7  
Old 04-29-2007, 11:21 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Chandler View Post
Which is something I don't want to do
If you have a custom fighting system, and using a custom keydown() check on s button it won't destroy the bush, however:

If you make something like

PHP Code:
function onCreated()
  
setTimer(0.05);
function 
onTimeout()
{
  if (
player.ani == "sword") {
    
setani("punch""");
    
freezeplayer(0.255);
  }
  
setTimer(0.05);

Only thing is that you have to make sure weapons don't get disabled through
disableweapons() etc..
__________________
Reply With Quote
  #8  
Old 04-30-2007, 01:20 AM
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 Chompy View Post
If you have a custom fighting system, and using a custom keydown() check on s button it won't destroy the bush, however:

If you make something like

PHP Code:
function onCreated()
  
setTimer(0.05);
function 
onTimeout()
{
  if (
player.ani == "sword") {
    
setani("punch""");
    
freezeplayer(0.255);
  }
  
setTimer(0.05);

Only thing is that you have to make sure weapons don't get disabled through
disableweapons() etc..
Problem with not disabling weapons is if you use a custom firing system, it will get all messed up.
__________________
Reply With Quote
  #9  
Old 04-30-2007, 07:55 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Shouldn't hitobjects destroy a bush?
Reply With Quote
  #10  
Old 04-30-2007, 12:34 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Chandler View Post
Shouldn't hitobjects destroy a bush?
Nope
__________________
Do it with a DON!
Reply With Quote
  #11  
Old 04-30-2007, 01:31 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 could do something with checking the tiles, and then if there are the bush tiles, change them to the dead bush tiles, then have some npc change it back after like 15 seconds ....
__________________
Reply With Quote
  #12  
Old 04-30-2007, 02:37 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbkbud View Post
Problem with not disabling weapons is if you use a custom firing system, it will get all messed up.
No.

Quote:
Originally Posted by cbkbud View Post
You could do something with checking the tiles, and then if there are the bush tiles, change them to the dead bush tiles, then have some npc change it back after like 15 seconds ....
Good luck (Serverside)


Best would be to make a own bush class, or when sword ani starts you change the ani in a 0.05 timeout loop?
__________________
Reply With Quote
  #13  
Old 04-30-2007, 02:39 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbkbud View Post
You could do something with checking the tiles, and then if there are the bush tiles, change them to the dead bush tiles, then have some npc change it back after like 15 seconds ....
That is a lot of work
You could I guess script it to do a putnpc2 when it kills the bush and after 15 seconds the putnpc2 would change the tiles back and then destroy() it self.
__________________
Do it with a DON!
Reply With Quote
  #14  
Old 04-30-2007, 08:01 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Still... going through way too much just to destroy a bush if you ask me...
Reply With Quote
  #15  
Old 04-30-2007, 08:06 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by cbkbud View Post
You could do something with checking the tiles, and then if there are the bush tiles, change them to the dead bush tiles, then have some npc change it back after like 15 seconds ....
If you remove a bush by changing the tiles the server should automatically change them back. It does on Delteria Dev.
Reply With Quote
  #16  
Old 05-01-2007, 01:33 AM
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 Riot View Post
If you remove a bush by changing the tiles the server should automatically change them back. It does on Delteria Dev.
I'm going to have to make this system anyway, or something like it, so I'll release it when it's done.

Edit: My level editor is busted, so can somebody please tell me the tiles[x,y] numbers for the dead bush?
__________________

Last edited by cbk1994; 05-01-2007 at 02:30 AM..
Reply With Quote
  #17  
Old 05-01-2007, 08:08 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
{
0x2A5,0x2A6,
0x2B5,0x2B6
}

or

677, 678,
693, 694

[Top left, to bottom right]
Reply With Quote
  #18  
Old 05-01-2007, 10:50 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 Chandler View Post
{
0x2A5,0x2A6,
0x2B5,0x2B6
}

or

677, 678,
693, 694

[Top left, to bottom right]
Thanks Chandler, <3

I have the code finished basicly, I just need to get the tile changing to work (stubborn NPC-Server). Once I finish it, I'll add it to the Code Gallery.

Edit: Done
http://forums.graal2001.com/forums/s...38#post1304938
__________________

Last edited by cbk1994; 05-01-2007 at 11:42 PM..
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 07:34 PM.


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