Posted by: ogalex - Saturday, December 15, 2018 11:25:28 PM
trying to create a custom dozer for the Laser general with the SW general power plants and cant figure it out. I have a script under PlyrCivilian
IF
True
'Lazr_AmericaPowerPlant becomes Buildable (No)
'SupW_AmericaPowerPlant' becomes Buildable (Ignore_Prerequisites)
Command Button: "SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr America vehicle dozer' in slot number 1 (1-12)
when I run the game it only blocks out the laser power plant and doesn't add the SW power plant
see images [ATTACH]2203[/Attach] [ATTACH]2205[/Attach]
Posted by: UTD^Force - Monday, December 17, 2018 5:25:37 AM
You can't add a command button on top of an already existing command button. You first need to remove the command button for the laser power plant, make these two scripts:
Script 1
*** IF ***
True.
*** THEN ***
Set timer 'asd' to expire in 0.50 seconds.
Command button: 'Lazr_Command_ConstructAmericaPowerPlant' is removed from all objects of type 'Lazr_AmericaVehicleDozer'.
Script 2
*** IF ***
Timer 'asd' has expired.
*** THEN ***
Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr_AmericaVehicleDozer' in slot number 1 (1-12).
I used two scripts as the game might crash if you remove and add the commandbuttons in one script, although I'm not sure about that, feel free to try it. There are other ways, but this should solve your problem.
Posted by: Annihilationzh - Monday, December 17, 2018 9:53:24 AM
[quote=ogalex;148451]Command Button: "SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr America vehicle dozer' in slot number 1 (1-12)[/quote]
Did you remove the invisible character here?
Posted by: ogalex - Monday, December 17, 2018 11:47:55 AM
[quote=UTD^Force;148452]You can't add a command button on top of an already existing command button. You first need to remove the command button for the laser power plant, make these two scripts:
Script 1
*** IF ***
True.
*** THEN ***
Set timer 'asd' to expire in 0.50 seconds.
Command button: 'Lazr_Command_ConstructAmericaPowerPlant' is removed from all objects of type 'Lazr_AmericaVehicleDozer'.
Script 2
*** IF ***
Timer 'asd' has expired.
*** THEN ***
Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr_AmericaVehicleDozer' in slot number 1 (1-12).
I used two scripts as the game might crash if you remove and add the commandbuttons in one script, although I'm not sure about that, feel free to try it. There are other ways, but this should solve your problem.[/quote]
so I added the above scripts exactly into my scripts and it has no effect. when map runs it leaves in the original power plant and doesn't add the SW power plant, if make the laser power plant unbuildable it still doesn't add the SW power plant.
and @Annihilationzh what is this invisible character you speak of?
Posted by: Annihilationzh - Monday, December 17, 2018 12:22:55 PM
[quote=ogalex;148454]and @Annihilationzh what is this invisible character you speak of?[/quote]
A notorious bug in world builder.
This is an example of a broken/glitched version with an invisible character:
[img]http://imgur.com/5zLc9Xw.png[/img]
This one is fixed:
[img]http://imgur.com/KHSLhLY.png[/img]
Photos courtesy of SkyMix_RMT.
Your SupW_Command_ConstructAmericaPowerPlant will be bugged this way. When you choose from the drop down list, a glitch puts an invisible character after the t in plant. You need to delete it. Easiest way is to delete the t in plant and then re-type it.
Posted by: ogalex - Monday, December 17, 2018 2:17:42 PM
@Annihilationzh yo big thanks man that was it. using the script posted by @UTD^Force and then renaming the plant the command now works and I can build SW general power plants out of the laser dozer