Scripts / How to get an AI character to shoot another AI Character

Author
Message
Saintyboy
9
Years of Service
User Offline
Joined: 18th Jun 2015
Playing:
Posted: 23rd Jul 2015 02:23
Firstly, is it possible to get an AI character to shoot another AI Character and secondly, if so, could someone get me started with the script. I thought that the following script would work if I placed it in a soldiers script so that he would shoot another AI character named Charlie:

if g_Entity[charlie]['plrvisible'] == 1 then
FireWeapon(charlie)
end

but I don't think I have grasped the concept correctly.

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 23rd Jul 2015 03:47
At the moment the AI can not shot each other. The voting page results today have AI up at the top. So after the performance enhancement update, this task can be started.

So don't spend to much time on it.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Saintyboy
9
Years of Service
User Offline
Joined: 18th Jun 2015
Playing:
Posted: 24th Jul 2015 00:54
Thanks for the prompt & kind reply Pirate Myke but I don't think AI navigation, which is at the top of the feature request list, would necessary cover this.
Surely there must be some way to script this in ourselves using Lua?
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 24th Jul 2015 01:23
Oh I thought this would be do-able in LUA by now? :/
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 24th Jul 2015 01:46
No sorry, there is not, they can not shot each other, because its not in the engine yet. You are more then welcome to try and find a LUA solution to this, and the engine commands are in the global.lua file in the scriptbank folder.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 24th Jul 2015 10:18
Quote: "No sorry, there is not, they can not shot each other, because its not in the engine yet."

Quote: "Oh I thought this would be do-able in LUA by now? :/"

I would support Teabone. Theoretically this should work:

while(enemies are there) do
Entity rotate to another entity.
Entity check if entity is alive/AI
Trigger shoot
Manually hurt other AI until death
end
idle

This must be tested if we can create something like this. With enough skill and ideas and workarounds this should work. I promise this is a task you not do on one day. And at the end you maybe have nothing to show or not even something that works.

Before you ask: No I can not do it at the moment cause lack of time.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 24th Jul 2015 13:30
Hi,
From memory, I think smallg has already done scripts for this.

look in his thread..

Cheers
I may be old, but at least my memory still ....hmmm

DT:Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528, AutoCAD, 3DsMax, Paint.Net, Solidworks.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Jul 2015 13:36
I did a version of it yh but its very simple bullet using another object, it won't account for obstacles and cover etc, much better to wait for the engine to support it with its in built weapon system
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-12-22 01:25:40
Your offset time is: 2024-12-22 01:25:40