[hlcoders] Resetting model entity for CTF
Hi, I'm currently trying to work in CTF as a gametype for the MOD I'm working on, but I'm having a bit of trouble on resetting the model entity (restoring it to its map-defined position) at the appropriate points. I'll probably end up going through it all and working something out eventually, but I just thought I'd ask here in case anyone can recommend something and save me the hassle :-) Thanks, --- Chris Adams ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Resetting model entity for CTF
-- [ Picked text/plain from multipart/alternative ] http://www.sourcewiki.org/wiki/index.php/Resetting_the_Map Could you adapt this to your needs? On 8/17/05, Chris Adams <[EMAIL PROTECTED]> wrote: > > > Hi, > > I'm currently trying to work in CTF as a gametype for the MOD I'm working > on, but I'm having a bit of trouble on resetting the model entity > (restoring > it to its map-defined position) at the appropriate points. I'll probably > end > up going through it all and working something out eventually, but I just > thought I'd ask here in case anyone can recommend something and save me > the > hassle :-) > > Thanks, > > --- > Chris Adams > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- - Ben Davison - http://www.shadow-phoenix.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Resetting model entity for CTF
I suppose I could but it seems terribly long-winded just to reset two entities :( I'll see if I can cut it down / modify stuff so that rather than having to keep entities I can specify ones to be removed and replaced Any suggestions are still welcome in the mean time :-) Thanks, --- Chris Adams -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Davison Sent: 17 August 2005 15:38 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Resetting model entity for CTF -- [ Picked text/plain from multipart/alternative ] http://www.sourcewiki.org/wiki/index.php/Resetting_the_Map Could you adapt this to your needs? On 8/17/05, Chris Adams <[EMAIL PROTECTED]> wrote: > > > Hi, > > I'm currently trying to work in CTF as a gametype for the MOD I'm working > on, but I'm having a bit of trouble on resetting the model entity > (restoring > it to its map-defined position) at the appropriate points. I'll probably > end > up going through it all and working something out eventually, but I just > thought I'd ask here in case anyone can recommend something and save me > the > hassle :-) > > Thanks, > > --- > Chris Adams > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- - Ben Davison - http://www.shadow-phoenix.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Resetting model entity for CTF
Actually I have another question that's loosely related... I haven't actually used Hammer so I'm not sure, but I believe you can create an entity as defined in the FGD, and then assign it with a name? So how would I go about in the source code getting a handle on the entity in the map that was named 'redflag' for instance of entity type eftcmp_flag? CEFTCMPFlag handle = .. :-) Thanks, --- Chris Adams -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Adams Sent: 17 August 2005 15:24 To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Resetting model entity for CTF Hi, I'm currently trying to work in CTF as a gametype for the MOD I'm working on, but I'm having a bit of trouble on resetting the model entity (restoring it to its map-defined position) at the appropriate points. I'll probably end up going through it all and working something out eventually, but I just thought I'd ask here in case anyone can recommend something and save me the hassle :-) Thanks, --- Chris Adams ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Resetting model entity for CTF
-- [ Picked text/plain from multipart/alternative ] http://developer.valvesoftware.com/wiki/My_First_Entity Has all the good stuff with linking the FGD hammer and your code together. On 8/17/05, Chris Adams <[EMAIL PROTECTED]> wrote: > > Actually I have another question that's loosely related... > > I haven't actually used Hammer so I'm not sure, but I believe you can > create > an entity as defined in the FGD, and then assign it with a name? So how > would I go about in the source code getting a handle on the entity in the > map that was named 'redflag' for instance of entity type eftcmp_flag? > > CEFTCMPFlag handle = .. :-) > > Thanks, > > --- > Chris Adams > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Adams > Sent: 17 August 2005 15:24 > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] Resetting model entity for CTF > > > Hi, > > I'm currently trying to work in CTF as a gametype for the MOD I'm working > on, but I'm having a bit of trouble on resetting the model entity > (restoring > it to its map-defined position) at the appropriate points. I'll probably > end > up going through it all and working something out eventually, but I just > thought I'd ask here in case anyone can recommend something and save me > the > hassle :-) > > Thanks, > > --- > Chris Adams > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- - Ben Davison - http://www.shadow-phoenix.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Resetting model entity for CTF
#include "entitylist.h" CBaseEntity *entity = gEntList.FindEntityByName( NULL, name, NULL ); The first and last NULLs are for the start entity and activator; here's the definition of FindEntityByName: CBaseEntity *CGlobalEntityList::FindEntityByName( CBaseEntity *pStartEntity, const char *szName, CBaseEntity *pActivator, CBaseEntity *pCaller ) gEntList is globally defined. ;) Philip Withnall > Actually I have another question that's loosely related... > > I haven't actually used Hammer so I'm not sure, but I believe you can > create > an entity as defined in the FGD, and then assign it with a name? So how > would I go about in the source code getting a handle on the entity in the > map that was named 'redflag' for instance of entity type eftcmp_flag? > > CEFTCMPFlag handle = .. :-) > > Thanks, > > --- > Chris Adams > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Adams > Sent: 17 August 2005 15:24 > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] Resetting model entity for CTF > > > Hi, > > I'm currently trying to work in CTF as a gametype for the MOD I'm working > on, but I'm having a bit of trouble on resetting the model entity > (restoring > it to its map-defined position) at the appropriate points. I'll probably > end > up going through it all and working something out eventually, but I just > thought I'd ask here in case anyone can recommend something and save me > the > hassle :-) > > Thanks, > > --- > Chris Adams > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Resetting model entity for CTF
Would it not be easiest to simply create a point entity like the player spawns that is something like flag_blue then when the "blue" flag is captured you can simply send it back to the flag_blue point? I'm sure there is some reason you wouldn't do it that simply, but off the top of my head that seems like the simplest way. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Resetting model entity for CTF
Waste of an entity instead, in the ::Spawn() method of your flag entity, save the GetAbsOrigin() to some m_vecInitial then when you want to "restore" it just SetAbsOrigin(m_vecInitial); From: "Andrew (British_Bomber)" <[EMAIL PROTECTED]> Reply-To: hlcoders@list.valvesoftware.com To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Resetting model entity for CTF Date: Wed, 17 Aug 2005 18:50:34 +0100 Would it not be easiest to simply create a point entity like the player spawns that is something like flag_blue then when the "blue" flag is captured you can simply send it back to the flag_blue point? I'm sure there is some reason you wouldn't do it that simply, but off the top of my head that seems like the simplest way. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _ Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSNĀ® Premium right now and get the first two months FREE*. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Resetting model entity for CTF
Aha. Thanks :-) --- Chris Adams -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maurino Berry Sent: 18 August 2005 01:57 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Resetting model entity for CTF Waste of an entity instead, in the ::Spawn() method of your flag entity, save the GetAbsOrigin() to some m_vecInitial then when you want to "restore" it just SetAbsOrigin(m_vecInitial); >From: "Andrew (British_Bomber)" <[EMAIL PROTECTED]> >Reply-To: hlcoders@list.valvesoftware.com >To: hlcoders@list.valvesoftware.com >Subject: Re: [hlcoders] Resetting model entity for CTF >Date: Wed, 17 Aug 2005 18:50:34 +0100 > >Would it not be easiest to simply create a point entity like the >player spawns that is something like flag_blue then when the "blue" >flag is captured you can simply send it back to the flag_blue point? > >I'm sure there is some reason you wouldn't do it that simply, but off >the top of my head that seems like the simplest way. > >___ >To unsubscribe, edit your list preferences, or view the list archives, >please visit: >http://list.valvesoftware.com/mailman/listinfo/hlcoders > _ Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=htt p://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSNR Premium right now and get the first two months FREE*. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders