Once again, I have a question. In fact, I'm surprised that I can not find it. I add the model to the unit (with the trigger "Attach model to the unit" or possibly - although it is less effective - "attach actor to the unit") The problem is when I want to remove this model (eg when the unit is burrowing) - what the function/trigger can be used to draw this model (without saving it in the form of a variable while creating, since we are talking about a common unit, and the number of variables is finite.:)). I've tried everything! If anyone knows about this please do reply - this is the only thing I miss to finish the map (hope so). :)
The Attach Model to Unit function returns an actor you can modify to your wishes. Set it to an actor variable and send a "destroy" actor message or disable its visibility.
Kueken: I know that but as i wrote - "(without saving it in the form of a variable while creating, since we are talking about a common unit, and the number of variables is finite.:)". I cannot do that because this is a model attach to common unit - infestor. I've got also a model attached to a hero - but because it's one hero and one model - I did exactly like you said. :) But as you can see the problem is deeper when it came to infestor. :(
Then I would recommend to use a specific actor instead of using the attach model to unit trigger. The trigger uses a generic model you cannot track; for a specific actor you can easily send messages to it via the unit's own actor messages. I recommend a pure data approach (here is a tutorial for data-only attachments, if you need)
You can also use arrays or the data table to keep track of the attached actors, if you don't want a pure data approach.
Once again, I have a question. In fact, I'm surprised that I can not find it. I add the model to the unit (with the trigger "Attach model to the unit" or possibly - although it is less effective - "attach actor to the unit") The problem is when I want to remove this model (eg when the unit is burrowing) - what the function/trigger can be used to draw this model (without saving it in the form of a variable while creating, since we are talking about a common unit, and the number of variables is finite.:)). I've tried everything! If anyone knows about this please do reply - this is the only thing I miss to finish the map (hope so). :)
Nimbus. :)
The Attach Model to Unit function returns an actor you can modify to your wishes. Set it to an actor variable and send a "destroy" actor message or disable its visibility.
@Kueken531: Go
Kueken: I know that but as i wrote - "(without saving it in the form of a variable while creating, since we are talking about a common unit, and the number of variables is finite.:)". I cannot do that because this is a model attach to common unit - infestor. I've got also a model attached to a hero - but because it's one hero and one model - I did exactly like you said. :) But as you can see the problem is deeper when it came to infestor. :(
Then I would recommend to use a specific actor instead of using the attach model to unit trigger. The trigger uses a generic model you cannot track; for a specific actor you can easily send messages to it via the unit's own actor messages. I recommend a pure data approach (here is a tutorial for data-only attachments, if you need)
You can also use arrays or the data table to keep track of the attached actors, if you don't want a pure data approach.
@Kueken531: Go
Thank you. I'll try to learn this (hate data editor :) )
Nimbus.