after destroy this actor save the destroy actor.not working !
iraqiraq
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
Make an attribute or table to save the information. Load!
i make load but not worked !
Are you using attributes or tables?
i using attribute
but how i use table with destroy actor ?
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
its worked You are truly wonderful human being creative and your brain good :kissing_heart: :kissing_heart:
@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
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.
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 ?
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).
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
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!
For a more in-depth introduction, there are some tutorials on YouTube.
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