Help please!!


(Constra) #21

How can i turn it off/on in the script ?


(S14Y3R) #22

:o

setstate <entityname> invisible
setstate <entityname> default

without <>'s…

it’ll go in the “buildstart final” stage of your func_constructible


(Constra) #23

So in mcm ,i give
Customimage
gfx/limbo/bridge.tga? :stuck_out_tongue:


(S14Y3R) #24

that should still go in the toi, the mcm is just to show the icon i think.


(Constra) #25

Hmm gona make a toi,targetname bridge_toi,then gona make it into mcm ,and gona target it the bridge?


(aburn) #26

AFAIK I used trigger brushes to make images and set those on/off

I just made a trigger brush round my constructibles than round the thing that was supposed to be constructed and than made both with trigger texture… than made them TOI and than added the images… and in the script made one visible and one not… and affter thing is constructed the other way round…

This should work…
if needed I can make a tutorial map where you will see how it works… but not untill tomorrow… got a plane to belgium today :stuck_out_tongue:

Chearz!


(Constra) #27

I get that ,but both TOIs must be targeting the bridge ?


(aburn) #28

Ops … you need a commandmap marker :stuck_out_tongue:

found a tut to do it but it is in polish will try to briefly translate

Make a trigger brush and make it trigger->trigger_objective_info
with these attributes :
K: track
V: bridge

K: scriptname
V: bridge_toi

K: customaxisimage
V: gfx/limbo/whateverpic

K: customalliesimage
V: gfx/limbo/whateverpic

K: target
V: cmm1

Now add a misc->misc_commandmap_marker
in the place where you want the marker to show with these attributes

K: targetname
V: cmm1

Make the same for the constructibles and than

in the script you do what S14Y3R said

setstate <entityname> invisible
setstate <entityname> default
in the right places of the script

For the states of bridge (yet to be constructed) and bridge (constructed)

[EDIT]

That would be two sets of toi’s and cmm’s one for constr… and one for bridge :smiley:

Hope this helps :stuck_out_tongue:


(Constra) #29

Okey,going to try it out,ty :slight_smile:


(Constra) #30

In script i put the TOI name or cmm name ?


(S14Y3R) #31

the mcm(misc_commandmap_marker) targetname to turn on/off.

gl 8)


(Constra) #32

I did it ,but messed up something :/.Look pm .


(S14Y3R) #33

D’oh! k, i’ll have a look for ya :stuck_out_tongue:


(S14Y3R) #34

Got it working, here’s what I did. For some reason I can only toggle it in this exact configuration. The toi needs a shortname or it won’t work at all. customaxisimage cc_empty is an empty image with an empty Alpha channel, it was working correct, except the Axis would see the orange/black missing texture… even with only_allied checked in the _mcm, and allied_only checked in the _toi it would still show for the axis…

Blank placeholder image for Other team:
Here

trigger_objective_info:

misc_commandmap_marker:

and this is the code added to the func_constructible:

tank_bridge       								
{
	spawn									
	{
		wait 400  							
		trigger self setup 						
		constructible_class 3                     			
	}

	trigger setup                                                           
	{
		setstate tank_bridge_mcm invisible   //<<=============!!
		setstate constructible_materials default				
		setstate constructible_clip_boxes default			
		setstate constructible_flag default					
	}

	built final								
	{
		setstate tank_bridge_mcm default   //<<==============!!
		setstate constructible_materials invisible				
		setstate constructible_clip_boxes invisible			
		setstate constructible_flag invisible				

		wm_announce "^7The allies have built a bridge for the tank^1!"
		globalaccum 0 bitset 0               
	}

	decayed final								
	{
		trigger self setup						
	}

	death									
	{
		trigger self setup						
		wm_announce "^7The axis have destroyed the bridge^1!"
	 	globalaccum 0 bitreset 0
	}
}

check your pm’s 8)


(Constra) #35

Compiling now .! :slight_smile:
Going to tet in a min !

Ty alot .


(Constra) #36

Works !!! :slight_smile:
Ty !