Is it part of the job stimulus package, to have all these extra labels floating around, or do they actually do something? Am I completely screwing myself when I make them all the same for my custom blueprints? Can someone explain the madness to me before I start trying to type with my forehead?
Tags, Template ResRefs, Resource Names what's the deal?
Débuté par
M. Rieder
, févr. 19 2011 04:28
#1
Posté 19 février 2011 - 04:28
#2
Posté 19 février 2011 - 12:38
Depends on what you are looking to do.
- If you want to spawn something in (that does not yet exist in-game) from its template blueprint, make sure that blueprint has a unique ResRef and Resource Name. I forget which the game uses (ResRef or Resource), so have these the same for each unique template. These must be all lower-case letters.
- Tags need to be unique if you are going to reference via script something that already exists. If you have more than one thing that exists in game with the exact same tag the game might "grab" the wrong one, unless you somehow narrow down which one you want (through the function GetNearestObjectByTag() or something similar). These can use either upper- or lower-case letters in the unique name.
So in short: Tag is used to refernce something that already exists in game, while ResRef/Resource Name is to reference something that does not yet exist in game but only as a blueprint.
Personally, I make all 3 (tag, resref, resource name) all the same per unique template blueprint, having each be all lower-case letters. There is no harm in all 3 being the same, as long as they are unique to that individual blueprint. Some functions (such as CreateObject()) allow you to change a tag to something else at the time the object spawns in.
Have not had a cup of coffee yet, hope all that makes sense.
- If you want to spawn something in (that does not yet exist in-game) from its template blueprint, make sure that blueprint has a unique ResRef and Resource Name. I forget which the game uses (ResRef or Resource), so have these the same for each unique template. These must be all lower-case letters.
- Tags need to be unique if you are going to reference via script something that already exists. If you have more than one thing that exists in game with the exact same tag the game might "grab" the wrong one, unless you somehow narrow down which one you want (through the function GetNearestObjectByTag() or something similar). These can use either upper- or lower-case letters in the unique name.
So in short: Tag is used to refernce something that already exists in game, while ResRef/Resource Name is to reference something that does not yet exist in game but only as a blueprint.
Personally, I make all 3 (tag, resref, resource name) all the same per unique template blueprint, having each be all lower-case letters. There is no harm in all 3 being the same, as long as they are unique to that individual blueprint. Some functions (such as CreateObject()) allow you to change a tag to something else at the time the object spawns in.
Have not had a cup of coffee yet, hope all that makes sense.
#3
Posté 19 février 2011 - 02:43
_Knightmare_ wrote...
Personally, I make all 3 (tag, resref, resource name) all the same per unique template blueprint, having each be all lower-case letters. There is no harm in all 3 being the same, as long as they are unique to that individual blueprint. Some functions (such as CreateObject()) allow you to change a tag to something else at the time the object spawns in.
Phew! That's a relief. I make them all the same per blueprint too. I was worried they had to be different since the globals are sometimes a little different. Thanks.





Retour en haut






