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
Areadef after dclick
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
Areadef after dclick
well guys i'd like to create a small area after dclicking an item, this area should be at dclicked item's possition as reference and may increase its size depending on some conditions, and also be removed (the area) when a timer gets to 0


i need some help about how could i do that?

ON=@Dclick
if (<baseid> == i_blah)
EVENT????
FUNCTION???
endif

should i add somekind of event??? function?
i need the basics..

ty very much.
07-01-2014 07:05 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Areadef after dclick
I'm not sure, but I think you can't make dynamic areas.

To add events on items -> events +t_events or tevents +t_events
To run functions, just call itself.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-01-2014 07:55 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: Areadef after dclick
Ty, too bad i can't do nothing about the areas :<
i think i might use foritems/forchars to add some flags to nearby players, :/
(This post was last modified: 07-01-2014 08:42 AM by kn4tseb.)
07-01-2014 08:35 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #4
RE: Areadef after dclick
There may be other ways to do what you want, try to give a general explanation of your idea and we may come with a solution Smile

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
07-01-2014 09:01 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Feeh's post
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #5
RE: Areadef after dclick
(07-01-2014 09:01 AM)Feeh Wrote:  There may be other ways to do what you want, try to give a general explanation of your idea and we may come with a solution Smile
I don't understand why they never explain what they're planning to do.
Then I always answer with mininum words.

Of course there is a way to do what he wants, but he never say in his threads!!

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-01-2014 09:13 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #6
RE: Areadef after dclick
i dont always say what i am trying to do because i complicate things...
but Extreme made me clear that its not possible to make dynamic areas... and the title is quite precise in my opinion...
but it's my fault... because im not totally sure about which conditions, events or functions i'd use....
at first i wanted to know if i could make a temporaly area by double clicking an item so i could add some flags to players when entering on it.. that's pretty much it
(This post was last modified: 07-01-2014 10:07 AM by kn4tseb.)
07-01-2014 10:06 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #7
RE: Areadef after dclick
How the players will enter in this area? Dcliking the item? If yes, just set them to get the events/flags when dclicking the item.
What are you trying to do? An arena?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-01-2014 10:29 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #8
RE: Areadef after dclick
no, its not an arena, @dclick, src double clicks an item, nearby characters gets a flag.
which reference should i use inside a function for character dclicking?

with an areadef i would have used @step
(This post was last modified: 07-01-2014 10:38 AM by kn4tseb.)
07-01-2014 10:37 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #9
RE: Areadef after dclick
[ITEMDEF i_myitem]
...

ON=@DClick
REF1 = <SRC> //store who dclicked the item if needed
REF2 = <UID> //store the item if needed
FORCLIENTS 5 // affect only logged in players in a radius of 5 or whatever radius you want
SAY Item <REF2.NAME> was dclicked by <REF1.NAME> and I was affected
TAG.MYFLAG = 1 //store the flag on nearby characters
ENDFORCHARS


SphereWiki contains almost every scripting details; Check out my signature

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
07-01-2014 11:32 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #10
RE: Areadef after dclick
(07-01-2014 12:02 PM)kn4tseb Wrote:  i know feeh, but im under a function, and i dont know how to store src (who dclicked the item)
tag/ctag only?

[itemdef blah]
...

ON=@Dclick
F_bla // this will run the function on the dclicked item, not on people
src.F_bla // this will run in who dclicked the item

[Function F_bla]
ref1 = <src> // if you run the function on item, it should work and <src> = who dclicked
ref1 = <uid> // this is 'who' or 'what' you used the function

it wont work :/
Its logic, if you run the function on item, <uid> = item and maybe <src> = who dclicked
if you run the function on who dclicked <uid> = who dclicked

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-01-2014 01:56 PM
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)