Right.
Ive found a few things:
* placing 10 sprites in the editor and then deleting 5 doesnt reorder the sprite naming, ie the next one placed will be "sprite 11" rather than "sprite 6".
doesnt sound much, but its a pain when cycling through the sprites with the helper functions as there isnt a helper function to check if a sprite exists.
I've had to manually go through and rename "sprite 1", "sprite 2", "sprite 3" etc up to the last sprite number so my looping functions work neatly
* brings me onto... renaming a sprite by clicking on it in the Visual Editor, clicking the "sprite 13" name in the box to the right, and changing to "sprite 1", then clicking out of the box to do something else *doesnt* save the change. Worth mentioning as it caught me out a couple times - you have to manually press Enter to register the change.
* with my above problem, manually looping through in code using the helper ID function, then setting the physics on for each does nothing. Im setting the physics mode for each sprite to 2, for dynamic.
* check it by putting the physics debug mode on, nothing happens, and all sprites are shown as green (static) rather than the cream I'd expect (for dynamic).
* if I go into the code for the helper functions direct, and change the "visualeditor_scene.agk" file code from:
// switch to static if nothing has been set
if VisualEditor_Entities [ index ].physics = 0
VisualEditor_Entities [ index ].physics = 1
endif
to:
// switch to static if nothing has been set
if VisualEditor_Entities [ index ].physics = 0
VisualEditor_Entities [ index ].physics = 2
endif
And run again, the debugger shows the sprites correct, and they start moving. However, they are squares, and the "Type" box of the Visual Editor (set to "polygon" for each) has no bearing.
This seems to indicate that changing physics properties outside of the loader functions has no bearing? Only when I change *within* the loading functions do the changes apply.
If I then change the code directly below the above code from:
SetSpritePhysicsOn ( ID, VisualEditor_Entities [ index ].physics )
SetSpriteActive ( ID, VisualEditor_Entities [ index ].active )
SetSpriteFlip ( ID, VisualEditor_Entities [ index ].flipH, VisualEditor_Entities [ index ].flipV )
To:
SetSpritePhysicsOn ( ID, VisualEditor_Entities [ index ].physics )
SetSpriteShape(ID, 3)
SetSpriteActive ( ID, VisualEditor_Entities [ index ].active )
SetSpriteFlip ( ID, VisualEditor_Entities [ index ].flipH, VisualEditor_Entities [ index ].flipV )
Then I can see that the shapes change accordingly using the physics debugger.
Why is it I cant set outside of the load functions?
Why are the physics flags of the Visual Editor not being taken into account?
* I thought it may be along the lines of the physics settings not being saved correctly in the Visual Editor as I found before (create a project, change the physics settings, then save and reload the project, the physics settings are back to default), so I started playing about with this:
1) If the sprite physics are set to FALSE, then my above method for changing in the loading functions works
2) If the sprite physics are set to TRUE and the project is run, then the above method in the loading functions stops working for that sprite
3) if the project is then saved, reloaded and run again, then the above method works again! Proving the sprites default fully back to FALSE
4) as an aside, if the FALSE wording of the physics property of a sprite is double clicked, then it jumps over to TRUE but then wont let you change back to FALSE unless you save and reload, on which point it goes back to FALSE as default above
Anyway, thems my findings!
I like what I see so far, but man I want these physics functions to work, my main reason for purchase.