Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 11:59 pm
All times are UTC + 0
changing a unit during the game
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 21, 2015 8:17 am    Post subject:  changing a unit during the game Reply with quote  Mark this post and the followings unread

Has anyone found out how to change a unit during a game via trigger?
Is it even possible to change a unit?
e.g.
The player starts with a Wolverine, moves on a certain cell, a Trigger fires and the Wolverine is replaced with a Titan.

How does the loaded Truck to unloaded Truck thing work? Is the truck a special hardcoded case?
Could this logic be applied to other units?
Can a train wagon for example switch from a loaded state to an unloaded state without disconnecting the train?

When a loaded Truck switches to an unloaded Truck, does only the image change or is the whole unit changed (different stats, weapon etc)?

Can this logic also work with InfantryTypes?


I think this has quite some potential for nice MP and SP missions, where a player starts for example with a special commando infantry, moves the unit on a cell with an overlay that looks like a weapon crate, and then the infantry changes into an alternate version with a different weapon.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Sep 21, 2015 9:04 am    Post subject: Re: changing a unit during the game Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Has anyone found out how to change a unit during a game via trigger?
Is it even possible to change a unit?
e.g.
The player starts with a Wolverine, moves on a certain cell, a Trigger fires and the Wolverine is replaced with a Titan.

Yes it is, entirely scripted of course.
If the unit enters a cell, create a team of that unit on that cell (by WP for example).
Then use the script action to delete teammember, and spawn the Titan using the same trigger (like Action 80, or 7).
You can attach some heartbeat trigger to the Titan through its TeamType.
Just make sure you disable the proper triggers if it is a mission critical unit Razz

Lin Kuei Ominae wrote:
How does the loaded Truck to unloaded Truck thing work? Is the truck a special hardcoded case?
Could this logic be applied to other units?

Yes. TRUCKA to TRUCKB and TRUCKB to TRUCKA. Entirely hardcoded.

Lin Kuei Ominae wrote:
Can a train wagon for example switch from a loaded state to an unloaded state without disconnecting the train?

IIRC there is an Action for a trigger that allows you to toggle the train cargo. It's 97; Toggles state of [Basic]→TrainCrate.
If you are referring to the logic of the Wolverine and Titan, I guess that's not gonna work as it requires the "Follows ID" field for a Unit.

Lin Kuei Ominae wrote:
When a loaded Truck switches to an unloaded Truck, does only the image change or is the whole unit changed (different stats, weapon etc)?

VehicleType [TRUCKA] changes to VehicleType [TRUCKB], they are two different units thus have their own stats.

Lin Kuei Ominae wrote:
Can this logic also work with InfantryTypes?

No experience with this, but I think it would work the same as the Wolverine example.

Lin Kuei Ominae wrote:
I think this has quite some potential for nice MP and SP missions, where a player starts for example with a special commando infantry, moves the unit on a cell with an overlay that looks like a weapon crate, and then the infantry changes into an alternate version with a different weapon.


Yes!

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 21, 2015 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the info.

Too bad the delete teammember, spawn new unit also resets the health. I was hoping there is a way to just switch the unit, but keep all the stats like health, veteran status, powerup crate bonus etc.
Especially for a commando mission it would have been nice if the assigned unit group number or the currently selected unit would stay assigned/selected.

I'll have to experiment a bit with this and the truck logic.
Though i guess the hardcoded TRUCKA to B change isn't enough for a missions needs, since there is no TRUCKC D etc. So the delete teammember spawn new unit way is the way to go.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Isaac_The_Madd
AA Infantry


Joined: 16 Jul 2015

PostPosted: Mon Sep 21, 2015 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

You could have a renegade havoc in Tiberian Sun in which he switches through his entire arsenal and "picks up" new weapons.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 21, 2015 2:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

That's the idea. Though i would create a new infantry from scratch and not use the Renegade model.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1730s ][ Queries: 11 (0.0090s) ][ Debug on ]