ogalex
  • ogalex
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
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
Capture2.PNG

Click to View Image33 View(s)

  Capture3.png (1,684kb) downloaded 18 time(s).
Sponsor
UTD^Force
7 years ago
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.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Annihilationzh
7 years ago

Command Button: "SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr America vehicle dozer' in slot number 1 (1-12)

Originally Posted by: ogalex 


Did you remove the invisible character here?
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
ogalex
  • ogalex
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago

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.

Originally Posted by: UTD^Force 



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?
Annihilationzh
7 years ago

and @Annihilationzh what is this invisible character you speak of?

Originally Posted by: ogalex 


A notorious bug in world builder.

This is an example of a broken/glitched version with an invisible character:

UserPostedImage

This one is fixed:

UserPostedImage

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.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
ogalex
  • ogalex
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
@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