Nuclide
Software Development Kit for id Technology (BETA)
CaptureItem.h
1/*
2 * Copyright (c) 2023-2025 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
29{
30public:
31 void ncCaptureItem(void);
32
33 virtual void Precache(void);
34 virtual void Respawn(void);
35 virtual void Touch(entity);
36 virtual void SpawnKey(string, string);
37 nonvirtual void Captured(float teamNumber);
38 nonvirtual void WatchPlayer(void);
39 nonvirtual void Return(void);
40
41private:
42 string m_desiredItem;
43 string m_goalItem;
44 string m_requiresItem;
45 int m_playerScore;
46 int m_teamScore;
47 float m_goalNo;
48 ncPlayer m_watchPlayer;
49 string m_outputOnCapture;
50 string m_outputOnTake;
51 string m_outputOnReturn;
52};
Item Capture Manager.
Definition: CaptureItem.h:29
virtual void Precache(void)
Definition: CaptureItem.qc:26
virtual void Touch(entity)
Called whenever we're touching another entity.
Definition: CaptureItem.qc:114
nonvirtual void WatchPlayer(void)
Definition: CaptureItem.qc:94
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition: CaptureItem.qc:37
nonvirtual void Captured(float teamNumber)
Definition: CaptureItem.qc:76
void ncCaptureItem(void)
Definition: CaptureItem.qc:18
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition: CaptureItem.qc:55
nonvirtual void Return(void)
Definition: CaptureItem.qc:87
This entity class represents every player client.
Definition: Player.h:142
This entity represents any ncEntity with advanced rendering properties.
Definition: RenderableEntity.h:95