SphereCommunity
Areadef after dclick - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Areadef after dclick (/Thread-Areadef-after-dclick)

Pages: 1 2 3


Areadef after dclick - kn4tseb - 07-01-2014 07:05 AM

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.


RE: Areadef after dclick - Extreme - 07-01-2014 07:55 AM

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.


RE: Areadef after dclick - kn4tseb - 07-01-2014 08:35 AM

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, :/


RE: Areadef after dclick - Feeh - 07-01-2014 09:01 AM

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


RE: Areadef after dclick - Extreme - 07-01-2014 09:13 AM

(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!!


RE: Areadef after dclick - kn4tseb - 07-01-2014 10:06 AM

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


RE: Areadef after dclick - Extreme - 07-01-2014 10:29 AM

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?


RE: Areadef after dclick - kn4tseb - 07-01-2014 10:37 AM

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


RE: Areadef after dclick - Feeh - 07-01-2014 11:32 AM

[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


RE: Areadef after dclick - Extreme - 07-01-2014 01:56 PM

(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