Product Chat / The ability to attachEntity's and Lights

Author
Message
BioDragonlord
10
Years of Service
User Offline
Joined: 17th Dec 2013
Location: Australia
Posted: 21st Jun 2014 09:35
would it be possible to have The ability to attach Entity's and Lights
to a path.

Ie: have a boat floating in a pond following a path, and be able to
set the path speed as you might want some items to move faster then
others.

Cheers

DL "Back in action"

Bring It On

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 24th Jun 2014 11:16
Eventually I would like this to be a built-in feature so you can draw out a path and assign any dynamic entity/light to it. For now we will be doing this functionality through scripting (on which the later easier system will sit upon). You could create a script in the latest build right now which can navigate a boat between coordinates, and if you look at the solider script you will see that you can get those coordinates directly from the waypoint system:

-- find initial waypoint path to follow
PathIndex = -1;
pClosest = 99999;
for pa = 1, AIGetTotalPaths(), 1 do
for po = 1 , AIGetPathCountPoints(pa), 1 do
pDX = g_Entity[e]['x'] - AIPathGetPointX(pa,po);
pDZ = g_Entity[e]['z'] - AIPathGetPointZ(pa,po);
pDist = math.sqrt(math.abs(pDX*pDX)+math.abs(pDZ*pDZ));
if pDist < pClosest and pDist < 200 then
pClosest = pDist;
PathIndex = pa;
end
end -- po
end -- pa

Fear not though! I appreciate not everyone in the world is a programmer, and we will be adding plenty of shortcuts and wizards within the IDE to make simply functionality such as following paths a breeze.

PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Jun 2014 12:39
Quote: "Eventually I would like this to be a built-in feature so you can draw out a path and assign any dynamic entity/light to it."


this would be good as the current waypoint system is hard to use as they just follow whichever is closest regardless of the "road" you draw

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 26th Jun 2014 10:39
If you start the character ON the node of one of the waypoint paths, they SHOULD follow that path. If this is not the case, it's a bug so please report this one to dave@thegamecreators.com. Thanks!

PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

Login to post a reply

Server time is: 2024-04-27 23:44:48
Your offset time is: 2024-04-27 23:44:48