![]() |
elementals - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: elementals (/Thread-elementals) |
RE: elementals - Crusader - 02-10-2013 01:04 AM post both of them... if u have this: ON=@RESOURCEFOUND SERV.NEWNPC c_elem_earth NEW.UPDATEX NEW.ANIM 12 NEW.ATTACK <SRC> u can do 2 things: first add event to the elemental like this: new.events +e_elem_raise and under this event u can try: [EVENTS e_elem_raise] on=@create (put ur call function here) but basically u maybe can try to do: ON=@RESOURCEFOUND SERV.NEWNPC c_elem_earth call_function <NEW.UID> NEW.ATTACK <SRC> but it depends on how ur call function is done...that's why i told u to post it ![]() RE: elementals - Mordaunt - 02-10-2013 02:40 AM Why in the world would you ever put that function under the @create trigger? that means for every elemental ever spawned it will raise up into the air, even if it is not generated by the mining script.. RE: elementals - Crusader - 02-10-2013 03:13 AM well, actually not, since it add the event ONLY when the spawning occurs on resource found. problem is, that i'm not sure if the @create is fired before the event adding or not. In any case i'm sure u might suggest a better solution ![]() RE: elementals - mrkarlo - 02-10-2013 03:13 AM okay, we have function f_raise. Code: ON=@Create it would be ok? RE: elementals - Crusader - 02-10-2013 03:17 AM uhm..i don't understand why u use "call" u just need to put f_raise but as i told u, u should post the whole f_raise function first......and if u put it inside the create like that, EVERY elemental will respawn 'raising' like mordaunt said. Come in chat if u can ![]() RE: elementals - Mordaunt - 02-10-2013 03:40 AM I dont understand why your using @create.... just do new.f_raise under the function that creates the creature when conditions are met. RE: elementals - mrkarlo - 02-11-2013 03:51 AM thanks! Code: ON=@Create right? RE: elementals - Mordaunt - 02-11-2013 04:43 AM no! Code: ON=@RESOURCEFOUND RE: elementals - mrkarlo - 02-19-2013 07:55 AM oh no, with elemental comes out from the ground strange stone wall. Here it is: Code: [function f_raise] and error in console: Undefined keyword 'ATTACK' Code: ON=@RESOURCEFOUND This error come out when im adding f_raise to @Resourcefound RE: elementals - Shaklaban - 02-19-2013 08:12 AM new is global reference, so it will fire on 05a item. ON=@RESOURCEFOUND IF (<eval RAND(2)> == 1) SERV.NEWNPC c_elem_earth NEW.UPDATEX NEW.ATTACK <SRC> new.f_raise ENDIF just put the f_raise under the attack |