• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] What is a node?

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2017
Messages
75
I've seen stuff like this in more advanced spells.

  • Set MS_NodeNext[MS_Spell_ID] = 0
  • Set MS_NodeNext[MS_NodePrev[0]] = MS_Spell_ID
  • Set MS_NodePrev[MS_Spell_ID] = MS_NodePrev[0]
  • Set MS_NodePrev[0] = MS_Spell_ID
So, I am wondering,
What is a node?
What are its functions?
For what types of spells should I use a node?
What type of variable (boolean, integer etc.) is a node?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Can you link a spell using it?

It looks like a linked list, possibly to achieve MUI by having a list of all currently active spells.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
What is a node?
What are its functions?
Wikipedia explains what a node is.
For what types of spells should I use a node?
Anything that requires a dynamic data structure of sort such as linked lists, binary search trees etc.
What type of variable (boolean, integer etc.) is a node?
Pointers to other nodes have to be integer as they represent an index in a set of arrays, however next to that a node can store any type or quantity of data.
 
Level 4
Joined
Jan 14, 2017
Messages
75
Jampiom, sorry for the late response first of all, I live in a different time zone.
Here is the spell. Meteor Strike v2.01

Wikipedia explains what a node is.Anything that requires a dynamic data structure of sort such as linked lists, binary search trees etc.Pointers to other nodes have to be integer as they represent an index in a set of arrays, however next to that a node can store any type or quantity of data.

What is a dynamic data structure? :grin:
 
Last edited:
Level 15
Joined
Mar 25, 2016
Messages
1,327
Jampiom, sorry for the late response first of all, I live in a different time zone.
Here is the spell. Meteor Strike v2.01
No problem.
In this spell it is used to keep track of all currently active spell instances to achieve MUI.
It is a list of spell ids and the ids can be used to reference the data attached to a spell instance (for example the current position of its meteor, traveled distance, etc.).
When a spell finishes, it is removed from the list, if a new spell is cast, it is added to the list.



I think that @KILLCIDE made a mistake there, because he is not using the recycle stack in the spell.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
      • Set MS_MaxIndex = (MS_MaxIndex + 1)
      • Set MS_Spell_ID = MS_MaxIndex
    • Else - Actions
      • Set MS_RecycledSize = (MS_RecycledSize - 1)
      • Set MS_Spell_ID = MS_RecycledStack[MS_RecycledSize]
I assume, that there is a condition missing like: if (MS_RecycledSize == 0)
 
You might find this tutorial useful:
Visualize: Dynamic Indexing

All these systems with indexes and arrays [] are usually meant to solve one problem: MUI. You'll need them for any triggered spell that isn't instant (e.g. damage over time, knockback effects, etc.).

Instead of having data for just one spell cast, you need to keep track of all the data for all spell casts going on to make sure you don't get any data mixed up. As Jampion mentioned, a "node" in this case is just the name for one spell cast. If you have 5 people casting your spell at the same time, you'll have 5 nodes.

That tutorial I linked above should explain things. Let us know if you need any more help!
 
Status
Not open for further replies.
Top