Alliance Salvage -1 reply

Please wait...

Lagomorphia

Non Applicable

50 XP

2nd August 2009

0 Uploads

26 Posts

0 Threads

#1 10 years ago

How exactly would I go about coding a ship (and story event to go with it most likely in the file that calls up heroes), so it can only be built once a certain ship has been destroyed. For example, if the Rebels destroy an SSD, they can then build the Lusanyka, or if they destroy one of lord_X's Ararmadias they can then build the New Republic version. From what I have gathered you first make a variant that belongs to the Alliance, like this: Generic_Star_Destroyer 4 Rebel That would be the Refitted ISD. Then you'd make a story event for the destruction of an ISD allowing the construction of the Emancipator. I know this can be done as there is a destruction objective (killing Moff Kalast in the Imperial Campaign), and a unit unlock (Zann ships in Zann campaign), I just have no idea how to do it. Also, would it be possible to script it so that the Rebels can build as many as they destroy?




Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#2 10 years ago

STORY_DESTROY Star_Destroyer UNIQUE_UNIT Star_Destroyer_Rebel Hoth True




Jedi_Lu

GF Pwns Me!

50 XP

12th October 2007

0 Uploads

55 Posts

0 Threads

#3 10 years ago
Sidious Invader;5021408 STORY_DESTROY Star_Destroyer UNIQUE_UNIT Star_Destroyer_Rebel <[COLOR=Red]Reward_Param1[/COLOR]>Hoth[COLOR=Red]Reward_Param1[/COLOR]> True

Reward_Param2 :nodding:

and unique_unit spawn a unit, for buildable only BUILDABLE_UNIT Star_Destroyer_Rebel




Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#4 10 years ago
For example, if the Rebels destroy an SSD, they can then build the Lusanyka, or if they destroy one of lord_X's Ararmadias they can then build the New Republic version.
Also, would it be possible to script it so that the Rebels can build as many as they destroy?
Reward_Param2 :nodding:

Thanks for catching that!!

and unique_unit spawn a unit, for buildable only BUILDABLE_UNIT Star_Destroyer_Rebel

That would enable him to build as many as he wants. He wanted to salvage a destroyed starship. So spawn one for every one destroyed.




Lagomorphia

Non Applicable

50 XP

2nd August 2009

0 Uploads

26 Posts

0 Threads

#5 10 years ago

No, no, no. Spawning is exactly what I DON'T want. That would mean they would get a FREE Star Destroyer every time.

Also, would it be possible to script it so that the Rebels can BUILD as many as they destroy?



Jedi_Lu

GF Pwns Me!

50 XP

12th October 2007

0 Uploads

55 Posts

0 Threads

#6 10 years ago
Lagomorphia;5023875Also, would it be possible to script it so that the Rebels can BUILD as many as they destroy?

Yes, is possible. The problem is the buildbar. You can 5 objects place in the buildbar ... One solution is a build dummy with a build restriction of 1. Is the build dummy construct, than spawn a real unit.

story destroy unit x, trigger buidable dummy unit, story construct dummy unit, trigger destroy object dummy unit, trigger lock dummy unit, trigger spawn real unit y, trigger reset the entire branch for next run

Do you understand it?

best regards Jedi Lu




Lagomorphia

Non Applicable

50 XP

2nd August 2009

0 Uploads

26 Posts

0 Threads

#7 10 years ago
Do you understand it?

No.




Jedi_Lu

GF Pwns Me!

50 XP

12th October 2007

0 Uploads

55 Posts

0 Threads

#8 10 years ago
Lagomorphia;5024861No.

And what do you not understood?




Lagomorphia

Non Applicable

50 XP

2nd August 2009

0 Uploads

26 Posts

0 Threads

#9 10 years ago

Everything. Can you show me the steps? As in, each piece of the story code as it's made?




Jedi_Lu

GF Pwns Me!

50 XP

12th October 2007

0 Uploads

55 Posts

0 Threads

#10 10 years ago
Lagomorphia;5028170Everything. Can you show me the steps? As in, each piece of the story code as it's made?

NOoooo! :uhoh:

Please learn a little bit story scripting. "Story Mode and Tutorial Scripting System document" from the Mapeditor, quod vide events and rewards,

then will you see and understand:

story destroy unit x, trigger buidable dummy unit, story construct dummy unit, trigger destroy object dummy unit, trigger lock dummy unit, trigger spawn real unit y, trigger reset the entire branch for next run