How can I separate an actor's settings (size, width, ect) from ever changing game.attributes?

Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302
edited April 2018 in Working with GS (Mac)

Ok, so I have an actor (a "Custom Made Fire Particle" actor that disappears within 1 second and half) who's characteristics (size, position, ect) are determined in a formula that contains game.attributes that changes constantly... and that is the problem... these game.attributes change constantly which causes my "Custom Made Fire Particle" actor to change along with it...

When my "Custom Made Fire Particle" actor is spawned, how can I prevent it from changing along with these rapid changing game.attributes?

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2018

    I have an actor whose size, position etc are determined by game.attributes that change constantly. When my actor is spawned, how can I prevent it from changing along with these rapid changing game.attributes?

    Switch off or delete the rule or condition that is making the actor change size/position.

  • Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302
    edited April 2018

    @Socks said:
    Switch off or delete the rule or condition that is making the actor change size/position.

    Ok, I tried that. I made actor receive the information (game.attributes) and then switched it off .3 seconds after, but unfortunately the actor disappears immediately after the .3 seconds instead of keeping the information from the game.attributes.

    So I guess what I need is for the game.attributes to somehow be saved in that actor's self.attributes. Any ideas?

    Or is there a way for an actor to replicate a separate entity of it's exact self, like a screenshot of itself, an image with no programming... or something of this sort?

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    edited April 2018

    Sounds like you want to store game attributes as self attributes.

    So as soon as the "Custom Made Fire Particle" is active you want to convert the game attributes to self.

    This means for every game attribute you want to store you need a corresponding self attribute.

    So if Game.FireHeight is one, make a Self.FireHeight on the "Custom Made Fire Particle"

    Then a change attribute behaviour to change Self.FireHeight to Game.FireHeight with no surrounding rule.

    And finally constrain(or change) Self.height to Self.FireHeight

    This way, as soon as the "Custom Made Fire Particle" spawns, it'll inherit the state of the Game.FireHeight without having it constantly changing.

    This can also be done by using only change attributes and the existing self attributes, without the need for additional attributes, so long as you only run/need to run the change attributes once per spawn without an encompassing rule to retrigger.

    Follow us: Twitter - Website

  • Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302
    edited April 2018

    @AlchimiaStudios you my friend are a genius. Thank you... worked beautifully!

    I replaced all formulas with the extra self.attributes I created thanks to you, then in a timer of .001 (after) I changed original self.attributes to the newlycreated.self.attributes... finally in a timer of .002 (after) I shut off the formulas before they changed value... and voila...

    KOOLNESS, thanks!

Sign In or Register to comment.