system
June 20, 2018, 12:02am
1
Attention
Topic was automatically imported from the old Question2Answer platform.
Asked By
Humfred
Hi,
I’m trying to learn Godot with this tutorial: http://docs.godotengine.org/en/latest/getting_started/step_by_step/your_first_game.html but with visual script.
For the part “Enemy scene”, i need to read an array ($AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
) and i have no idea how to do a simple var = array[0] !
Any help?
system
June 7, 2019, 11:27pm
2
Reply From:
vic.the.developer
From available nodes, use Expression. Set it to have 1 argument, pass in the array, and then type in a[0] and pass that one to where you need it.
system
August 29, 2020, 3:14pm
3
Reply From:
jasperbrooks79
you need ’ get index ’ box, first variable is index 0, 2nd is 1, integers <3
Can you explain this better? I find three different get index boxes and none seem to make sense. Thank you.
Dosedmonkey | 2021-01-17 11:23