I think its time to give prototypes access scene attributes ..
Like the title says , its about time you guys give us access to scene attributes from a prototype actor .
Trying to calculate "VectorToAngle" or "Magnitude" is getting very exhausting on scrollable scenes, cause if the camera is at 1000 , the touch values are still registered as if the touch is inside the 320x480 area . then the we need to add the scene origin to get the correct value of the touch with the offset.
Opening prototypes to instances or constraining the scene origin values to game.attributes in order to have access is a nasty way of doing things , and often cause performance to halt .
Please give us access to scene attributes from prototypes and make our lives easier
Thanks
Roy.
Trying to calculate "VectorToAngle" or "Magnitude" is getting very exhausting on scrollable scenes, cause if the camera is at 1000 , the touch values are still registered as if the touch is inside the 320x480 area . then the we need to add the scene origin to get the correct value of the touch with the offset.
Opening prototypes to instances or constraining the scene origin values to game.attributes in order to have access is a nasty way of doing things , and often cause performance to halt .
Please give us access to scene attributes from prototypes and make our lives easier

Thanks
Roy.
Comments
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
scene attributes are scene elements (i.e. local … applicable within the scene)
game attributes can not change scene attributes … but, scene attributes can change game attributes
okay we can work with/around this:
1. in sceneAttributes: + an Index attribute scene#
2. in gameAttributes: + an Index attribute scene#
in your Prototype actor
create Rules:
when game.scene# = 1
do this and that
etc.
3. in your scene prototype Control Actor: changeAttribute: game.scene# To: 0
(leave at 0 for now change to Current scene.scene# in instances)
some basic rules with condition of the actor are doable this way
I use it to changeAttribute: self.image in my generic background actor
Vector to angle and magnitude without parameters go in fine
but, yuck, you are still going to have to get/set those X,Ys in instance
MH
" Vector to angle and magnitude without parameters go in fine
but, yuck, you are still going to have to get/set those X,Ys in instance "
Yep , exactly !
Any word from the GS team about this?
Roy.
Now, That being said….
Heres a Workaround I use.
This will only work if the rules and behaviors are going to be exactly the same throughout each prototype you are doing this to.
Unlock and instance and create your rules/behaviors with the scene attributes Put all of it into a group and be sure to name the Group something unique.
NOw drag that group over to your custom behaviors.
you can now have access to those attributes by dropping the custom behavior in the prototype. Dont be alarmed that it may give warnings about the attribute and the fields will be empty while editing the prototype but once it is in a scene you can open it and see the fields are properly filled out.
Good Luck
+ 9999999 from me!