attaching a team_CTF_xxxflag to a mover


(Flippy) #1

Hey all…

just for testing im trying to attach a team_CTF_blue/redflag to a script_mover…

im using the “tag_player_at_origin” tag thingy from Erik.ftn (or smth)

untill now i can get the team_CTF_blueflag to show up (a goldbox) AND even to move together with the script mover when i press a button.
BUT i cannot steal the goldbox! (tried both axis, allied, and im not in warmup)

is this simply because it cant be done? or is it a problem with the tag file or that the origin (or the point where the game detects a “steal” from the team_CTF_blueflag)… im thinking this “trigger area” might be outside my map… (but using noclip flying up and down outside the map didnt steal it either…)
?


(Flippy) #2

Here is something else i’ve found… (im now trying to make the goldbox appear/dissapear)

Quote from Nullskillz:

Theoretically it should be possible to set the state of every entity that has a scriptname wit the “setstate”-scriptaction:


ENTITY_SCIPTNAME
{
   // ...

   trigger default
   {
      setstate default
   }

   trigger underconstruction
   {
      setstate underconstruction
   }

   trigger invisible
   {
      setstate invisible
   }

   // ...
}

However, it doesn’t work…
Script: (team_CTF_blueflag scriptname: goldbox)


goldbox
{
	trigger default
	{
		setstate default
	}

	trigger invisible
	{
		setstate invisible
	}
}

When i press the button that triggers the “trigger goldbox default” and “trigger goldbox invisible” functions, the map crashes and ET says “G_scripting: setstate must have a name and an state” (complete with the spelling error “an state” :stuck_out_tongue: )


(psyco_mario) #3

Shouldnt it say setstate goldbox invisible ?


(Flippy) #4

it should, but “goldbox” needs to be the targetname of the team_CTF_blueflag, and those entities can’t have targetnames for some reason… so im looking for a different way to do it, and found this way… (setstate invisible under it’s own scriptblock)
however i didnt get it to work yet…


(FireFly) #5

it should, but “goldbox” needs to be the targetname of the team_CTF_blueflag, and those entities can’t have targetnames for some reason…

team_CTF_blueflag /reflag can have a targetname, but you need to manually change your et_entities.def file for this to work…
See this topic for more info, particular MadMaximus’ post :http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8335


(Flippy) #6

Ah wow thnx for that! Im gonna test it right away!

just for the curious, you don’t need an edited .def file, you just need to “alertentity [scriptname of team_CTF_blue/redflag]” in the game_manager to make it work!