HeroEngine Forums

HeroEngine Support => Scripting & Programming => Topic started by: keeperofstars on Jan 08, 13, 07:58:06 PM

Title: [Resolved] creating scripts in dom always or HSE
Post by: keeperofstars on Jan 08, 13, 07:58:06 PM
when working through various tutorials some scripts are done with the dom and others just with the heroscript editor.

One thing I noticed was classes created with the dom show up everywhere, but classes created in HSE don't show up in the dom.

Is there any advantage or reason to create them with HSE, or is it wiser to create them all in the dom, incase later on we want to add fields, script destinations etc to the script?

Thanks

Title: Re: creating scripts in dom always or HSE
Post by: Grogard on Jan 09, 13, 03:18:44 AM
In dom also created Prototype object, for GUI at exmaple.

Simple script with oit DOM can contains some utility functional.
Title: Re: creating scripts in dom always or HSE
Post by: TGSRofar on Jan 09, 13, 04:53:44 PM
Classes can only be created with the DOM editor.  The script for the implentation of a class is created with the Script Editor.  This can be accomplished by using File->New in the script editor or by clicking the Open Script link in the DOM editor.  Either way accomplishes the same thing. I prefer using the DOM editor link because the script is named automatically.

Other scripts (not class scripts) can be created in with the Script Editor also.  These would be procedural scripts not tied to a specific class.

Remember, a script with a name that ends with "ClassMethods" is a class script.  Any other script is purely a procedural script with functions.