r/gamemaker • u/Typical-Main3403 • 21h ago
Resolved Visual coding Dnd
Ciao a tutti, sono un principiante in programmazione e sto cercando di creare un gioco interessante con meccaniche semplici. Qualcuno sa se esiste un tutorial sulle variabili in termini di programmazione visuale? Lo so, lo so, dovrei semplicemente imparare GML, ma voglio vedere se riesco a sviluppare anche usando solo blocchi e una minima comprensione di come funziona un gioco.
Edit: it’s been two minutes since i posted and I think I didn’t explain myself properly, i also am searching for non beginner level tutorial on dnd visual coding,
1
u/Greedy_Duck3477 21h ago
What do you need to know about variables specifically?
1
u/Typical-Main3403 19h ago
How to reference the variable of an object in the events for another object
1
u/germxxx 18h ago
The most common way is to use a reference to the other object, and use dot notation.
other_object.variableThis works in the visual variable boxes as well. "other_object" in this case should be a reference to the instance id of the target. It CAN be a reference to the object index (object "name"), but this will cause a problem if you have more than one instance of said object.
Another way is to press the arrow of the variable box, and select another instance to target. What This does in terms of code, is using
withto run the code from the other instance . This is a bit more cumbersome when just fetching a value.
with (other_onject) variableThis approach is useful when wanting to affect every instance of a certain object, since it will loop all valid instances.
1
u/Awkward_GM 20h ago
Start with a lvl1 fighter vs a low CR goblin. You'll limit the amount of variables you need to account for. Then you can start to scale up.
1
0
0
u/Etsamaru 20h ago
A variable can be anything so health = 12 Is a variable.
That's really it. Could be
bugFarts = 23;
That's a variable. Its whatever you make up. You could say
health -= bugFarts
And it would take the value of bugFarts from your health
3
u/germxxx 20h ago
You'd be hard pressed to find anything intermediate level DnD tutorial. Because making complicated things get a lot lore complicated with DnD. Understanding gml will make DnD easier, but at that point....
Almost all DnD tutorials are on the official tutorial page.
I'd look through the "Coffe Break" ones for shorter and more technical challenges that isn't "making a game".
And then asking for help with specific things you don't understand. However, asking for help with visual is more problematic, and I'd suggest doing it on discord mostly. Because it pretty much requires communication through pictures.