Exit Script event not exiting

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Exit Script event not exiting

Postby Danny » Sat Feb 27, 2016 7:55 pm

Okay for some reason the "EXIT SCRIPT" event is not working or i don't understand how it really works. I have a custom event that checks to see if i cancelled the Ai's current objective, if so then "Exit Script" if not take the right node and continue with the script. I thought if the exit script event was used it would exit the entire scripting window from running the scripts below? Is that right?

If thats right then its not working, i triple checked to ensure that its going through the left node and activating the exit script event and it is but the script after the exit script event is still running instead of being skipped.

Bug or am i using it wrong?


User avatar
RamchuK_Ntertainment
Ultimate 001 Member
 
Joined: Tue Sep 29, 2009 10:50 pm
Location: Seattle, Washington

Re: Exit Script event not exiting

Postby RamchuK_Ntertainment » Sat Feb 27, 2016 8:00 pm

Actually, I believe the 'Exit Script' event is only applicable within Sub Scripts, so it doesn't simply halt the entire script within a line of events. If you ever need to stop a particular event while not in a loop or sub script, simply use a comparison branch and change a condition that would be checked for before running another script.
Travesty: 3D Survival - WIP >>> Forum Topic
University of Washington (BABA)
-REGT- Ramchuk Entertainment Games Team
Strategy/Action/Adventure
Copyrighted©2008-2017

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Exit Script event not exiting

Postby Danny » Sat Feb 27, 2016 8:04 pm

RamchuK_Ntertainment wrote:Actually, I believe the 'Exit Script' event is only applicable within Sub Scripts, so it doesn't simply halt the entire script within a line of events. If you ever need to stop a particular event while not in a loop or sub script, simply use a comparison branch and change a condition that would be checked for before running another script.


Thats just it, the script is being used with in a subscript. :?

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Exit Script event not exiting

Postby Mr.Numbers » Sun Feb 28, 2016 12:58 am

"Darkness Cancel Check" is a custom event, correct? If so, regardless of cancelling the subscript or not (In the custom event), the script WILL continue past the custom event.

What I would recommend is using the "Branch Possibility" option for custom events. This allows you to have 2 "Nodes" out the bottom of the custom event. To tell the custom event which "Node" to take, you make the custom event return a value at the end of the script (Using the "Return Value" event).
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Exit Script event not exiting

Postby Danny » Sun Feb 28, 2016 7:57 am

Mr.Numbers wrote:"Darkness Cancel Check" is a custom event, correct? If so, regardless of cancelling the subscript or not (In the custom event), the script WILL continue past the custom event.

What I would recommend is using the "Branch Possibility" option for custom events. This allows you to have 2 "Nodes" out the bottom of the custom event. To tell the custom event which "Node" to take, you make the custom event return a value at the end of the script (Using the "Return Value" event).


Branch Possibility solves the problem. Thank you. :D


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron