I have several dialog portraits with model - portrait set to marine. What im trying to do is:
1. run a triggers that will set corresponding variables depending on what kind of unit player is controlling (and these will be changing)
2. then in other triggers i would like to use these variables to change the portrait shown in the dialog portraits.
Is it possible to use variables for that somehow? Or i need to do it all without variables?
I cant find a way to let the action "Set dialog item model" somehow reach the variable... dont even know which variable type i should use :S Seems there is no variable for that particular use, but maybe there is some workaround? I can store unit type in variable, but how make the "set dialog item model" somehow set the model portrait related with that unit type?
Use a "Game Link - Model" Variable. You can use a switch depending on the unit type to set your variable, or use string conversion (most portraits are called "<UnitName>Portrait"). Then your variable should also pop up in the "Set dialog item model" action.
Ok seems im semi-blind atm due to being tired. Cause i cant figure a way to do what you just said :) Will try tommorow to do some more brainstorming. If you would be bored however i would be very thankfull if you would try to do it yourself and show how you managed to do it.
Its alive! its alive!! It works! You are genius :D For a while i even thought you were wrong cause i should first write "Portrait - " as first string, but when i checked the raw data its indeed unitnamePortrait as model name. People like you can inspire to learn so much in this editor. Huge thanks again mate! You deserve a beer.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have several dialog portraits with model - portrait set to marine. What im trying to do is:
1. run a triggers that will set corresponding variables depending on what kind of unit player is controlling (and these will be changing) 2. then in other triggers i would like to use these variables to change the portrait shown in the dialog portraits.
Is it possible to use variables for that somehow? Or i need to do it all without variables?
I cant find a way to let the action "Set dialog item model" somehow reach the variable... dont even know which variable type i should use :S Seems there is no variable for that particular use, but maybe there is some workaround? I can store unit type in variable, but how make the "set dialog item model" somehow set the model portrait related with that unit type?
Use a "Game Link - Model" Variable. You can use a switch depending on the unit type to set your variable, or use string conversion (most portraits are called "<UnitName>Portrait"). Then your variable should also pop up in the "Set dialog item model" action.
@Talon0815: Go
Ok seems im semi-blind atm due to being tired. Cause i cant figure a way to do what you just said :) Will try tommorow to do some more brainstorming. If you would be bored however i would be very thankfull if you would try to do it yourself and show how you managed to do it.
Thanks anyway.
Something like this should work:
(myPortrait should be global ofcourse if you use multiple triggers)
@Talon0815: Go
Thanks a lot friend! Cant wait to finish work so i can try this one out. You are awesome, sir! :)
Its alive! its alive!! It works! You are genius :D For a while i even thought you were wrong cause i should first write "Portrait - " as first string, but when i checked the raw data its indeed unitnamePortrait as model name. People like you can inspire to learn so much in this editor. Huge thanks again mate! You deserve a beer.