• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code replacement of execute_string?

TsukaYuriko

☄️
Forum Staff
Moderator
I'll split this because it has little to do with the topic it was posted in, as well at that topic being four years old.

You don't need execute_string or any replacement for it for any of this.

To get a resource's ID based on its name, use asset_get_index.
Better yet, store the resource IDs in a data structure that can be indexed by whatever it is you're indexing it by (I'll assume "facing" is numeric), such as an array.

The variable name is static here, so that doesn't need to be parsed.
 
Thanks for the reply and input. That's double dutch to me.
do I replace
execute_string('sprite_index=sprSword'+objLink.facing)
draw_y=0

with
asset_get_index ('sprite_index=sprSword'+objLink.facing)
draw_y=0
 
Top