The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Breakable Wall
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #1
Breakable Wall
Hello, I am trying to create a wall that is breakable over time.

The player has to be in war mode and once they begin double clicking the wall it starts to break and finally remove. Can someone help me out?
01-30-2015 05:08 PM
Find all posts by this user Like Post Quote this message in a reply
Jim
Apprentice
*

Posts: 28
Likes Given: 1
Likes Received: 12 in 4 posts
Joined: Jan 2015
Reputation: 0



Post: #2
RE: Breakable Wall
i don't konw if it is ok for you, the following :

//difine a type "t_wall_breakable", the wall will be remove in 5 seconds after first-doubleclicking by player
[TYPEDEF t_wall_breakable]
ON=@DCLick
if !(<src.flags>&statf_war)
src.message peace mode?
return 1
endif
SRC.MESSAGE hitting the wall!
link=<src>
if (<timer>>=0)
return 1
else
timer=5
return 1
endif

ON=@Timer
link.message broken the wall!
remove
return 1

//attach the type to the item "TEVENTS=t_wall_breakable"
[ITEMDEF i_wall_stone_aged_breakable]
ID=i_wall_stone_aged
TEVENTS=t_wall_breakable

//maybe add the distance judgement after war mode judgement.
if (<distance> > 1)
src.message too far away!
return 1
endif
(This post was last modified: 01-30-2015 07:06 PM by Jim.)
01-30-2015 06:47 PM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #3
RE: Breakable Wall
Thanks man! That'll do the job.

But is there a way so if the player stops double clicking the wall then the timer stops?

I'd like it so they have to double click the wall like 15 times for it to break. if thats possible
01-31-2015 08:06 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #4
RE: Breakable Wall
[TYPEDEF t_wall_breakable]
ON=@DCLick
if !(<src.flags>&statf_war)
src.message peace mode?
return 1
endif
SRC.MESSAGE hitting the wall!
src.tag0.breakingwall ++
if (<tag0.breakingwall>==15)
remove
src.message broken the wall!
tag.breakingwall
return 1
else
src.message <eval 15-<src.dtag.breakingwall>> left to breake the wall!!
endif
01-31-2015 09:02 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #5
RE: Breakable Wall
You should think about adding a time check or people with Razor/Assist/Injection/etc will break walls in less than 1second
01-31-2015 07:27 PM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #6
RE: Breakable Wall
Will do, thank you guys!
02-01-2015 06:55 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)