after destroy this actor save the destroy actor.not working !

iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89

hello every body i want make (1actor) if i destroyed this (1actor) and if i reset game the (actor1) hide thats mean destroyed
but how ?
i need destroy him if i touched not collide !

Comments

  • pHghostpHghost London, UKMember Posts: 2,342

    Make an attribute or table to save the information. Load!

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89
    edited March 2017

    i make load but not worked !

  • pHghostpHghost London, UKMember Posts: 2,342

    Are you using attributes or tables?

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89

    i using attribute
    but how i use table with destroy actor ?

  • pHghostpHghost London, UKMember Posts: 2,342

    So, make it like this:

    Self (Actor) Attribute:
    index -- self.destruction = 0

    In the Actor:

    Load Att; key: destroyed att: self.destruction

    Rule 1:
    If touch pressed, change att: self.destruction = 1
    save att: self.destruction key: destroyed

    Rule 2:
    If self.destruction = 1, destroy actor

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89

    its worked You are truly wonderful human being creative and your brain good :kissing_heart: :kissing_heart:

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89
    edited March 2017

    @pHghost my brother i make store in my game thats mean if i cliked to buy button the button its hide but now he not hide ! i try your rule but worked 1 time but if i reset the game . the button buy its back .why ?
    or you can give me rule
    if i buy this actor i bayed just one time tahts mean if i clicked again he not take from money again just one time

  • pHghostpHghost London, UKMember Posts: 2,342

    @iraqiraq said:
    i try your rule but worked 1 time but if i reset the game . the button buy its back .why ?

    Are you testing this in GameSalad? Creator doesn't remember these things if you quit and start again. It will work on device, as long as people don't delete the app from their phone.

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89

    ok very thnx for you i have last a question in my game i have 30 hero thats mean i have load and save 30 table . i think its slow my game ? or no problem ?

  • pHghostpHghost London, UKMember Posts: 2,342

    Depending on the data you need in the table, you could have all the information in ine single table, one row for each hero.

    But even having one table for each hero should be OK. Tables are very efficient and should not slow down your game (unless the tables are absolutely HUUGE).

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89
    edited March 2017

    its hard to me make table,, can you give me a demo ? or learn me how i make this table ? and im sorry Because I asked too much
    i think be like this number of hero the price of buy hero just this

  • pHghostpHghost London, UKMember Posts: 2,342

    Tables are basically just a way to save a lot of information in one place.

    Like in Excel, you have rows and columns and can save data in the cells.

    You can access the cells (either to read or write data) by using the expression editor. Use the TableCellValue() function. Select the correct table, row and column and it will allow you to use or modify what is there (there is a behaviour for the latter). To save the table, just use the Save Table behaviour. No need to remember save keys and the like!

  • pHghostpHghost London, UKMember Posts: 2,342

    For a more in-depth introduction, there are some tutorials on YouTube.

  • iraqiraqiraqiraq iraq baghdad , muslimMember Posts: 89
    edited March 2017

    i swear i make all the table but all video youtube not worked with my hero shop
    in youtube learn me how update hero ! i dont need like this

Sign In or Register to comment.