Serious Forward Spawn flag problem


(Mapper X) #1

:banghead: Hi all :banghead:

Got a problem, I made a Forward spawn flag. But some things are really crazy.


Problem 1:
When Axis capture the flag there is no problem, they spawn at the second spawn. But when Allied capture the flag, I disconnect and I get this message

G-Scripting:alertentity cannot find targetname ''flagspawn''

This is my script for the Forward spawn flag.


trigger flag1_firstred
	{
		accum 1 abort_if_not_equal -1
		accum 2 abort_if_not_equal 0
		accum 1 set 0
	}

	trigger flag1_firstblue
	{
		accum 1 abort_if_not_equal -1
		accum 1 set 1
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		setautospawn	"Robot Spawn"	1
		wm_announce	"^3Allies have captured the flag"
	}
	trigger flag1red
	{
		trigger game_manager flag1_firstred
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		accum 1 set 0
		setautospawn	"Allied Side"	1
		wm_announce	"^3Axis have reclaimed the flag"

	}
	trigger flag1blue
	{
		trigger game_manager flag1_firstblue
		accum 1 abort_if_not_equal 0
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		accum 1 set 1
		setautospawn	"Robot Spawn"	1
		wm_announce	"^3Allies have captured the flag"
	}

}



flag1
{
	trigger axis_capture
	{
		trigger game_manager flag1red
	}

	trigger allied_capture
	{
		trigger game_manager flag1blue
	}
	
	trigger del
	{
		remove
	}
}

}


I searched for tutorials but they don’t give me the information I need. The error says taht I’ve got to do something with the targetname ‘‘flagspawn’’.

Plz give me information and help me with this :banghead:

:banana: Mapper X :banana:


(Marko) #2

either you’re missing an entity with the “flagspawn” targetname, or you simply need to delete the lines in your script where you call “alertentity flagspawn”


(Mapper X) #3

Hi marko :banana:

I used your script for the flag, u’ll recognize it :drink:

But what entity needs the targetname ‘‘flagspawn’’

:???: :???: :???:

And what does the alerentities mean? :???:

Thx for your answer :beer:


(FireFly) #4

Looking at the script I’d say that your “team_CTF_bluespawn” and “team_CTF_redspawn” needs the targetname "flagspawn’’.

alertentity will turn an entity ‘on’ or ‘off’
with this you can, for example, turn smoke on or off.
However in your case ‘alertentity flagspawn’ and ‘alertentity flag1blob’ will switch the teams spawning at the flag around.(redteam vs blueteam)


(Mapper X) #5

Thx firefly for ur answer, but do I have to change targetname or also the scriptname? And what about Flagblob ? Now I get that error :frowning:

:???: :???: :???: :???:



        trigger flag1_firstred
	{
		accum 1 abort_if_not_equal -1
		accum 2 abort_if_not_equal 0
		accum 1 set 0
	}

	trigger flag1_firstblue
	{
		accum 1 abort_if_not_equal -1
		accum 1 set 1
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		setautospawn	"Robot Spawn"	1
		wm_announce	"^3Allies have captured the flag"
	}
	trigger flag1red
	{
		trigger game_manager flag1_firstred
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		accum 1 set 0
		setautospawn	"Allied Side"	1
		wm_announce	"^3Axis have reclaimed the flag"

	}
	trigger flag1blue
	{
		trigger game_manager flag1_firstblue
		accum 1 abort_if_not_equal 0
		accum 2 abort_if_not_equal 0
		alertentity flagspawn
		alertentity flag1blob
		accum 1 set 1
		setautospawn	"Robot Spawn"	1
		wm_announce	"^3Allies have captured the flag"
	}

}

:banghead:


(FireFly) #6

you need to give the following entities these keys/values:

team_WOLF_checkpoint

targetname : flag1 
scriptname : flag1 
target : flagspawn
team_WOLF_objective

targetname : flag1blob 
scriptname : flag1blob
description: Robot Spawn
team_CTF_redspawn

targetname : flagspawn 
scriptname : ( I don't think this is used in the script, so you can name this anything you like)
team_CTF_bluespawn

targetname : flagspawn 
scriptname : ( again not being used in the script, as far as I can see )

Don’t know if you allready have one , but you also need a ‘script_multiplayer’ entity in your map with the key/value scriptname : game_manager

I also noticed this line in the script

accum 1 abort_if_not_equal -1

meaning some parts of the script won’t run if the accum 1 isn’t set to -1 in the game_manager portion of the script.

accum 2 abort_if_not_equal 0

can’t see why this is being used so It’s save to delete these lines OR ad “accum 2 set 0” to the game_manager portion of he script.

Basically your script would look like this:

game_manager
{
	spawn
	{
	 accum 1 set -1
         }


   trigger flag1_firstred 
   { 
      accum 1 abort_if_not_equal -1 
      accum 1 set 0 
   } 

   trigger flag1_firstblue 
   { 
      accum 1 abort_if_not_equal -1 
      accum 1 set 1 
      alertentity flagspawn 
      alertentity flag1blob 
      setautospawn   "Robot Spawn"   1 
      wm_announce   "^3Allies have captured the flag" 
   } 
   trigger flag1red 
   { 
      trigger game_manager flag1_firstred 
      accum 1 abort_if_not_equal 1 
      alertentity flagspawn 
      alertentity flag1blob 
      accum 1 set 0 
      setautospawn   "Allied Side"   1 
      wm_announce   "^3Axis have reclaimed the flag" 

   } 
   trigger flag1blue 
   { 
      trigger game_manager flag1_firstblue 
      accum 1 abort_if_not_equal 0 
      alertentity flagspawn 
      alertentity flag1blob 
      accum 1 set 1 
      setautospawn   "Robot Spawn"   1 
      wm_announce   "^3Allies have captured the flag" 
   } 

} 

flag1
{
	trigger axis_capture
	{
		trigger game_manager flag1red
	}

	trigger allied_capture
	{
		trigger game_manager flag1blue
	}
	
	trigger del
	{
		remove
	}
}

Hope it works…


(Mapper X) #7

Thx for your help Firefly :banana:

But I can’t work on my map for the moment, got a virus on my pc. So I have to use my mother’s PC which is SLOW :frowning:

Thx :drink:

Je bent een belg eh? :banana: