eventloadactor TRIGGERQUOTE
   getactor[THISACTOR].hitag HITAGSAVED
   getactor[THISACTOR].lotag LOTAGSAVED
   setvarvar tr_lotag LOTAGSAVED
   getactor[THISACTOR].zvel tr_bits
   setactor[THISACTOR].hitag 0
   setactor[THISACTOR].lotag 0
   getactor[THISACTOR].owner trigger_var
	
    getactor[THISACTOR].xvel rx_can 
	ifvare LOTAGSAVED 9
	ifvarn rx_can 0
	{
		setvar trigger_var 1
		setvar spriteid 0
		whilevarvarn spriteid NUMSPRITES
		{
			getactor[spriteid].picnum picnum
			ifvare picnum SECTOREFFECTOR
			{
				getactor[spriteid].xvel rx_can
				getactor[THISACTOR].xvel tx_can
				ifvarvare tx_can rx_can ifvare sprite[spriteid].lotag 60 { setvarvar supersecret sprite[spriteid].hitag }
			}
			addvar spriteid 1
		}
	}
		

   cstat 32768
enda

actor TRIGGERQUOTE
	ifvare peractor3 0
	ifvare LOTAGSAVED 9
	{
			getplayer[THISACTOR].max_secret_rooms tmp
			addvar tmp 1
			setplayer[THISACTOR].max_secret_rooms tmp
			setvar peractor3 1
	}
	getplayer[THISACTOR].i PLAYERID

ifvarn rx_can 0
{	
	ifvare tr_bits 2 {
		ifhitspace {
			ifvare peractor 0 { 
				getplayer[ftqplayer].posx px
				getplayer[ftqplayer].posy py
				getplayer[ftqplayer].posz pz
				getplayer[ftqplayer].cursectnum psector
				getplayer[ftqplayer].ang pang
				getplayer[ftqplayer].horiz phoriz
				subvar phoriz 100
				mulvar phoriz -2048
				cos mycos pang
				sin mysin pang
				ifvarn psector -1 hitscan px py pz psector mycos mysin phoriz RETURN RETURN pid RETURN RETURN RETURN 0xFFFF0030h //4294901808
				ifvarn pid -1 {
					dist tmp pid PLAYERID
					ifvare actorvar[pid].active 0 ifvarl tmp 1280 ifvarvare sprite[pid].yvel rx_can  {				
						qstrcpy 8 LOTAGSAVED 
						quote 8 
						setplayer[ftqplayer].ftq LOTAGSAVED 
						setvar peractor 1 
					}
				}
			}
		} else setvar peractor 0	
	}	
}
ifvare tr_bits 1
{
	getactor[THISACTOR].sectnum sectnum
	getactor[PLAYERID].sectnum sectorid
	ifvarvare sectnum sectorid { ifvare peractor2 0 { qstrcpy 8 LOTAGSAVED quote 8 setplayer[ftqplayer].ftq LOTAGSAVED ifvare trigger_var 1 setvar quote_tmp 1 setvar peractor2 1 } } else setvar peractor2 0
}
ifvare tr_bits 0 {
	ifvare active 1 { qstrcpy 8 LOTAGSAVED quote 8 setplayer[ftqplayer].ftq LOTAGSAVED ifvare trigger_var 1 setvar quote_tmp 1 else setvar active 0 }
}
ifvare quote_tmp 1 
{ 
	ifvare LOTAGSAVED 9
	{
		getplayer[THISACTOR].secret_rooms tmp
		addvar tmp 1
		setplayer[THISACTOR].secret_rooms tmp
		ifvare supersecret 1 setvar supersecavaible 1
	}
	ifvare tr_bits 2 nullop else killit
}
enda