HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] creating scripts in dom always or HSE  (Read 901 times)

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
[Resolved] creating scripts in dom always or HSE
« 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

« Last Edit: Jan 10, 13, 04:10:42 PM by HE-Cooper »
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Grogard

  • World Owners
  • ****
  • Posts: 36
    • View Profile
Re: creating scripts in dom always or HSE
« Reply #1 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.
Logged

TGSRofar

  • General Accounts
  • *
  • Posts: 153
    • View Profile
Re: creating scripts in dom always or HSE
« Reply #2 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.
Logged
Ron Farrell
Lead Programmer
Triad Game Studios