The Dink Network

attach_script(1000); means ?

April 2nd 2018, 05:59 PM
duckdie.gif
crypto
Peasant They/Them
 
i see ..

attach_script(1000);

all over ... now i thought at first that .... it was just a certain script ...

however, it seemed to be used on all kinds of scripts, that are not related.

what is attach_script(1000); doing ?

attach_script(0); i assume means unload ?
April 2nd 2018, 08:45 PM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
script_attach(1000); is used generally for warps and cutscenes where the script should continue running after a screen change. It should be terminated with kill_this_task(); after it has finished though. Also for reference, Dink is sprite one.

I have a feeling script_attach(0); would crash the engine
April 2nd 2018, 09:26 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
IIRC, script_attach(0) attaches the script to the current screen, where it will be unloaded when the screen is changed.
April 3rd 2018, 02:17 PM
duckdie.gif
crypto
Peasant They/Them
 
great thanks
April 3rd 2018, 03:05 PM
dinkdead.gif
Check the DinkC Reference, it's a help file inside your Dink folder (in /develop)

Perfect for looking up individual commands like this
April 5th 2018, 02:09 PM
duckdie.gif
crypto
Peasant They/Them
 
ya if there was a develop folder i would ... i have the one from this site now though .......