
DavixXx
Joined: Mar 22, 2009
MW map pask in process
|
Posted: Jul 26, 2010 11:46 AM
Msg. 1 of 10
Hi all. i want to make a script when devices_control actived and object is destroyed i tried Quote: (script dormant name (begin (if (= (device_set_power name (list_get (players) 0)) 1.0) (begin (object_destroy name) but dont work can you help me
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Jul 26, 2010 12:12 PM
Msg. 2 of 10
i think a dormant script needs to be called by another script to work... try the (script startup command instead?
|
|
|

DavixXx
Joined: Mar 22, 2009
MW map pask in process
|
Posted: Jul 26, 2010 01:13 PM
Msg. 3 of 10
ah ok but i cant compile on sapien Quote: 07.26.10 11:35:24 [controler line 3] i expected a real, but this function returns a object.: (list_get (players) 0)) 2.0)
07.26.10 11:35:24 recompiling scripts after scenarios were merged. 07.26.10 11:35:24 this left parenthesis is unmatched.: (if (= (device_set_power name (list_get (players) 0)) 1.0)
when i put a parenthesis erreo persist
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Jul 26, 2010 01:17 PM
Msg. 4 of 10
i think that means you have to add more left parenthaseis to the end of the script.
|
|
|

Co1t3r
Joined: Dec 13, 2008
|
Posted: Jul 26, 2010 02:31 PM
Msg. 5 of 10
Quote: --- Original message by: DavixXx (script dormant name (if (= (device_set_power name (list_get (players) 0)) 1.0) (begin (object_destroy name) ) )
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Jul 26, 2010 02:42 PM
Msg. 6 of 10
lol ok im still fairly new to scripting
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Jul 26, 2010 06:20 PM
Msg. 7 of 10
Quote: --- Original message by: ASP_GRUNTS(script dormant name (if (= (device_get_power name) 1) (object_destroy name) ) ) That should work. The one by Co1t3r shouldn't, as it is missing parenthesis still and hasn't fixed the other error with the if statement. Edited by ASP_GRUNTS on Jul 26, 2010 at 03:37 PM Lolstandoff
|
|
|

DavixXx
Joined: Mar 22, 2009
MW map pask in process
|
Posted: Jul 26, 2010 07:07 PM
Msg. 8 of 10
thank you is working, i was put too many parenthesis  PS: when i active the device control(holo control) the object is not destroyed why ? Edited by DavixXx on Jul 26, 2010 at 07:28 PM
|
|
|

DavixXx
Joined: Mar 22, 2009
MW map pask in process
|
Posted: Jul 26, 2010 11:09 PM
Msg. 9 of 10
i modified some line Quote: (script startup name (sleep_until (= (device_get_position name) 1)) (object_destroy name) ) and now its working
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 27, 2010 12:31 AM
Msg. 10 of 10
You changed it from a dormant to a startup, thus eliminating the need for a wake command.
|
|
|