Forum

How to re-spawn entity/How to set entity to null?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

How to re-spawn entity/How to set entity to null?

Postby daemonicky » Fri May 06, 2011 8:19 pm

Id like to spawn-remove entity at will. I have reference to in global variable. When I remove it, the reference remains but I'd like to set it to zero or null so I can spawn it later. How do I set null entity?

I guess solution might be to create global variable NullEntity and use it as null, but is there some more natural way to it?[/code]
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby mh » Fri May 06, 2011 9:23 pm

Look at how entities like lava balls work. Should give you a good starting position.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Fri May 06, 2011 9:38 pm

world = null.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: How to re-spawn entity/How to set entity to null?

Postby frag.machine » Sat May 07, 2011 12:30 am

daemonicky wrote:Id like to spawn-remove entity at will. I have reference to in global variable. When I remove it, the reference remains but I'd like to set it to zero or null so I can spawn it later. How do I set null entity?

I guess solution might be to create global variable NullEntity and use it as null, but is there some more natural way to it?[/code]


set it to world:
Code: Select all
entity fooentitty = world;
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest