Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline ogalex  
#1 Posted : Saturday, December 15, 2018 11:25:28 PM(UTC)
ogalex
Private
Joined: 12/10/2018(UTC)
Posts: 3

Thanks: 2 times
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

Edited by user Saturday, December 15, 2018 11:31:16 PM(UTC)  | Reason: Not specified

File Attachment(s):
Capture3.png (1,684kb) downloaded 17 time(s).
ogalex attached the following image(s):
Capture2.PNG
Sponsor
Offline UTD^Force  
#2 Posted : Monday, December 17, 2018 5:25:37 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
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.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
thanks 1 user thanked UTD^Force for this useful post.
ogalex on 12/17/2018(UTC)
Offline Annihilationzh  
#3 Posted : Monday, December 17, 2018 9:53:24 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Originally Posted by: ogalex Go to Quoted Post
Command Button: "SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'Lazr America vehicle dozer' in slot number 1 (1-12)

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.
Offline ogalex  
#4 Posted : Monday, December 17, 2018 11:47:55 AM(UTC)
ogalex
Private
Joined: 12/10/2018(UTC)
Posts: 3

Thanks: 2 times
Originally Posted by: UTD^Force Go to Quoted Post
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.


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?
Offline Annihilationzh  
#5 Posted : Monday, December 17, 2018 12:22:55 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Originally Posted by: ogalex Go to Quoted Post
and @Annihilationzh what is this invisible character you speak of?

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.
thanks 2 users thanked Annihilationzh for this useful post.
ogalex on 12/17/2018(UTC), UTD^Force on 12/17/2018(UTC)
Offline ogalex  
#6 Posted : Monday, December 17, 2018 2:17:42 PM(UTC)
ogalex
Private
Joined: 12/10/2018(UTC)
Posts: 3

Thanks: 2 times
@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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.