Matthew has been working on script properties for the past week and they are now ready for you to use!
What are script properties?
Script properties are special variables that you can define in a new panel located at the top of the script editor. You can define a default value for them, and then each game object component using your script can redefine those to customize how your script works!
For instance you could define a script property named “Health” in your enemy behavior and make it default to 100. But maybe some enemies are stronger (or weaker!)… Previously you would have been forced to duplicate your script. Now you can simply tweak the property’s value per game object in the scene editor!
It makes your scripts reusable and tweakable. Pretty awesome right?
The “Amplitude” property has a default value of 0.5 in this script from CraftStudioKart
The Amplitude value has been replaced with 2 in this particular instance of the behavior.
- Fixed a crash when trying to paste anything but text in the chat (thanks EpicFrame for the report!)
- That’s it!
This release introduces, among many other changes, some much needed project management features:
- You can now transfer assets between projects by using the Import / Export pane in the administration tab
- The project’s Recycle bin replaces the buggy Storage pane
- Search dialog in scripts (hit Ctrl+F!)
Last week also saw some initial porting work for Linux and MacOS X. We managed to get some bits of CraftStudio working but there’s more work ahead!
- The administration tab’s Storage pane has been removed in favor of a Recycle bin pane which displays only trashed assets. Multiple bugs have been fixed in the process. All asset types can now be properly restored.
- A message is now displayed when a member is added or removed from a project.
- Locked assets have now an indicator icon.
- Implemented Import / Export pane in the administration tab. It allows transferring assets between projects.
- Renamed “Export” to “Run project” and use a Play icon for running the project
- CraftStudioKart has been added to the default project list and to the Community pane
- A spinning wheel is now displayed while assets are loading
- Fixed block focusing bug for tile size above 16
- Fixed a crash when copying, cutting or deleting an empty selection
- Fixed a crash related to the opacity slider of model renderer & map renderer components
- Fixed a crash when reloading a scene before a map renderer’s tile set has been received
- You can now do a search in scripts by hitting Ctrl+F
- Moving between words with Ctrl and Left / right arrow has been enhanced to detect word boundaries much better (taking into account various separator symbols)
- Tabs can now be closed with a middle click
- Fixed viewport boundaries bug while resizing the main window
- The client now keeps track of whether the user can edit assets on a project and prevent trying if they can’t. Previously script edits from spectators were silently rejected on the server but the client allowed typing.
- Set proper mouse cursor when hovering edit boxes
- Fixed a crash when hitting Space while no item is hovered in a drop-down box
- Prevent demoting / blacklisting / removing the last administrator of a project
- Added GameObject:GetName and GameObject:SetName
- Fixed ModelRenderer:GetOpacity not working
- Fixed Ray string conversion
- Fixed GameObject:GetComponent() triggering an error instead of returning nil when no component was found
- Fixed spectactors being able to edit game controls and which tile set a map uses
Here comes another release. I sense a lot of fixes and a bunch of new scripting functions in this one!
If you’re wondering why there are so many releases lately, it’s because @Matthtz and I are working on the prototype for Project Waffle and we’re improving CraftStudio on the way! (Also, @ThomasFrick is working on some pretty amazing graphics)
- Fixed a massive memory leak in scenes which led to crashes
- Added /projectguid chat command to get the project’s globally-unique ID (which also happens to be the name of the folder it is stored in)
- It’s no longer possible to insert line breaks in edit boxes and the maximum chat message length has been set to 500 characters
- Improved Lua error reporting to avoid obscure “Error in .NET user-code” messages
- Fixed pivot offset not being applied when reparenting a block
- Fixed transform fields not updating when switching from the Animation to the Build pane in models
- Model animations
- Fixed bug in orientation composition order when adding creating an orientation keyframe
- Fixed the animation preview pane’s minimum size to avoid garbling the interface
- Script editor
- The current line’s indentation is now carried over to the next line when hitting Return
- Tab and Shift+Tab allow indenting / undenting one or more lines at once
- Disabled line numbers in script previews
- Tabs are now correctly converted to spaces when pasted (instead of displaying as “?”)
- Miscellaneous fixes
- Fixed linked assets names in game object components not updating live
- Fixed focus issues in popups
- Fixed a master server-related crash when reconnecting
- Fixed a ray-casting bug with maps using tiles with a size different of 16
- It’s now possible to use Ctrl as a key for camera controls again
- Script API
- Fixed Vector3.Transform
- Fixed a crash when a client requests data for a non-existent asset
- Fixed duplication of tile sets not working and leading to crashes
Hey folks, here’s CraftStudio 0.1.6.0 (with Server 0.1.5.0)!
Many exciting improvements in this release, including new map block shapes, improved node reparenting, tons of fixes and lots of new scripting functions!
- Implemented new block shapes for maps: inverted stairs, corner slope, corner stairs and corner panes
- Implemented basic support for global opacity in ModelRenderer and MapRenderer components. It doesn’t work well yet but it’s a start.
- Reparenting model blocks and scene nodes now keep their position / orientation properly. No more jumping around!
- When copying in bitmap compatibility mode, the background is now filled with magenta for easier removal
- It’s now possible to move a selected part of the texture with the Move tool without first cutting / pasting it
- Fixed a client-side transparency bug when pasting
- It’s now possible to indent a bunch of lines at once by selecting them and pressing Tab (Shift+Tab for unindenting is coming soon)
- Fixed text wrapping bug in script editor
- Miscellaneous bug fixes
- Fixed the Animation tab’s model not updating properly sometimes
- When a member’s account type is updated on connection, all connected members are now properly notified
- The Blacklist / Remove / Approve buttons in the Members pane of the Administration tab are now properly hidden if they can’t be used
- Fixed various popup-related bugs
- Fixed spinning wheel displaying forever alone when previewing a map with no tile set
- Fixed a crash when trying to create a model node before the model had been downloaded from the server
- Fixed a rare crash when deleting or renaming scene nodes
- Bumped the Script API version to 2 because of Transform:Rotate and Transform:RotateLocal now using Quaternion.
- Added ModelRenderer:SetModel, ModelRenderer:GetModel
- Added MapRenderer:SetMap, MapRenderer:GetMap
- Added MapRenderer:SetTileSet, MapRenderer:GetTileSet
- Added SetOpacity and GetOpacity to ModelRenderer and MapRenderer
- Implemented Vector3.Dot, Vector3.Cross, Vector3:SqrLength(), Vector3 * Vector3, Vector3.Transform, Vector3.Distance and others functions (thanks @3DReMix for submitting most of those!)
- Added Quaternion class (with a few useful methods, probably more to come)
- Bug fixes
- Fixed game object orientation composition order. Basically there was a bug in Transform:GetEulerAngles() which returned the wrong value. Now fixed. Yay!
- Fixed camera lagging behind one frame when its transform is updated
- Fixed CraftStudio.Instantiate crashing when called from Behavior:Awake()
- The bind address & port is now displayed when the server is starting
- Added support for the new map block shapes
A wild release appears!
This new update wouldn’t be nearly as awesome without @Matthtz who started his internship at Sparklin Labs this week by working on implementing asset previews and various other improvements. So a big shout out to him for the great job he’s doing and let’s hope the next two months rock just as much as those first two days
- Implemented asset previews in popups, including model animations and scripts
- Star icons are now displayed next to premium member names in the member list and the home pane (lightning icons for pre-alpha & generous supporters)
- When creating a new animation or tile set, they are now linked to the current model or map automatically so they can be used right away without requiring an extra click on the checkbox
- Added missing es-ES localization to the packaged ZIP
- Allow changing the brush size with Ctrl + mouse wheel
- Fixed cutting (with Ctrl+X) and deleting (with the Del key) in a texture not properly notifying the server
- Prevent painting when viewing a revision
- A clipboard setting has been added because of compatibility issues with some programs
- The “I” cursor is now used when hovering text areas
- Fixed CraftStudio starting even when no Auth.cfg file is present
- Fixed line-ending bug when pasting text from outside CraftStudio
- Fixed animation playback restarting from the first frame after being paused
- Fixed a crash when access to the export directory is denied while exporting the project
- Store and send member account types