StarCraft® II

[Solved] How to Modelswap using Triggers?

How can I modelswap using triggers? What am doing is, I made a unit and made a button. When the player hits that button the trigger will activate modelswaping the units form to (anything). If you know a simpler way please tell me.
-Answer-
Event: (Anything you want to happen)
Action: Send Actor Message to Unit > Click on Message > Choose ModelSwap > Then choose the unit that it is going to modelswap to.
Edited by DeathBringer on 1/9/2013 5:41 PM PST
Reply Quote
I don't remember the full trick 100% by heart but it's something like that :

1) Keep an actor variable reference on the unit's actor you want to switch.
2) Make said actor invisible (actor-wise), NOT the unit itself.
3) Add a new actor attachment on the unit. I think it must be attached to the body or feet or whatever the exact term.

The following have the following advantages :

- Allows full swapping including wireframes and sounds and such (which 100% normal modelswapping doesn't)
- Ability to use any actor you want on the fly with very minimal work involved. No countless actor modification for every possibility imaginable.


Drawbacks I noticed :

- Might require constant actor + unit variables per unit if you want to re-switch a 2nd time or more. I didn't actively test if it possible since I only needed a 1 time switch.
- Even if you made the earlier actor invisible, it would still do its death sounds (and actor death?). Hence you might be limited to start off with a dummy (but attachable) actor with dying actor and no death sound to make it work.
- Does generate actor error messages during gameplay. Requires you either select the "Hide Trigger Errors " map option (also hides actor ones). Perhaps you can do it via "Suppress Creation Errors" on each actor involved instead.
Edited by Honejasi on 1/6/2013 12:15 PM PST
Reply Quote
I don't remember the full trick 100% by heart but it's something like that :

1) Keep an actor variable reference on the unit's actor you want to switch.
2) Make said actor invisible (actor-wise), NOT the unit itself.
3) Add a new actor attachment on the unit. I think it must be attached to the body or feet or whatever the exact term.

The following have the following advantages :

- Allows full swapping including wireframes and sounds and such (which 100% normal modelswapping doesn't)
- Ability to use any actor you want on the fly with very minimal work involved. No countless actor modification for every possibility imaginable.


Drawbacks I noticed :

- Might require constant actor + unit variables per unit if you want to re-switch a 2nd time or more. I didn't actively test if it possible since I only needed a 1 time switch.
- Even if you made the earlier actor invisible, it would still do its death sounds (and actor death?). Hence you might be limited to start off with a dummy (but attachable) actor with dying actor and no death sound to make it work.
- Does generate actor error messages during gameplay. Requires you either select the "Hide Trigger Errors " map option (also hides actor ones). Perhaps you can do it via "Suppress Creation Errors" on each actor involved instead.

Could you give me a file of a trigger done just in any map you have? So I don't get more confused than I will trying to add your information into my map?
Reply Quote
His solution is a bit more advanced. I'm assuming you're new to the editor.

Simpler solution:

1) Use the action "Send Actor Message to Unit"

2) Set the unit parameter to the unit you want to send the modelswap to.

3) Select the actor message parameter. Then go to the functions tab (you know, the place where you choose from Functions, Presets, Variables, etc. Click "Functions"). Then search "modelswap" in the functions section. Select it. Set the model parameter to the model that you want to switch the unit's model with. Set the 0 following it to "1". (The 0 is where you put the model variation, the putting of the 1 is just to be safe.)
Reply Quote
His solution is a bit more advanced. I'm assuming you're new to the editor.

Simpler solution:

1) Use the action "Send Actor Message to Unit"

2) Set the unit parameter to the unit you want to send the modelswap to.

3) Select the actor message parameter. Then go to the functions tab (you know, the place where you choose from Functions, Presets, Variables, etc. Click "Functions"). Then search "modelswap" in the functions section. Select it. Set the model parameter to the model that you want to switch the unit's model with. Set the 0 following it to "1". (The 0 is where you put the model variation, the putting of the 1 is just to be safe.)

I see "Options: Function", don't know how to search modelswap in that section.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]