Callback/OnReset

From Blue Mars Developer Guidebook

Jump to: navigation, search

This is a callback in Entity Scripts

Function

OnReset()
called by the Sandbox Editor when it resets state, i.e. when a level is started with BlueMars>Switch to Preview Mode or CTRL-G and ended with ESC.

Notes

To facilitate development/prototyping/testing, it's often a good idea to have your OnInit callback call OnReset and place any level initialization there.

Example

function MyObject:OnInit()
	self:OnReset()
end

function MyObject:OnReset()
	self:Activate(1)
end
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools