Hey! As some of you may or may not have seen, I've recently started writing (pretty bad) LUA scripts and am trying to improve them. I've found out, that certain values have certain addresses on the ram that can be searched instead of the value itself. Sadly there aren't many tutorials about this, so I can't really learn this proerly. What I don't get is: Do addresses for certain variables always stay the same? If I for example have 50 HP, find the value and its address and save the adress. Now I complete the level, restart the game and get back up to 100 HP. Would the address still be the same? I'm only talking about static addresses here, as I know that dynamic ones are much harder to find.
Now to the second question: Why would one use pointers, if they already know the address of a value? If the address is dynamic, the address will change anyway, essentially making the pointer useless, or not?
Sorry for my probably rather dumb question, I just couldn't figure it out on my own (or wasn't 100% sure) and don't want to release a faulty script.
Edit: What I've learnt so far (by trial & error) is, that addresses always stay the same, no matter what happens to their value. Is that correct?
Now to the second question: Why would one use pointers, if they already know the address of a value? If the address is dynamic, the address will change anyway, essentially making the pointer useless, or not?
Sorry for my probably rather dumb question, I just couldn't figure it out on my own (or wasn't 100% sure) and don't want to release a faulty script.
Edit: What I've learnt so far (by trial & error) is, that addresses always stay the same, no matter what happens to their value. Is that correct?
Last edited: