Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rssrace_huntbot

Category:script
Author(s):Wojak
Downloads:2473
Rate:You need to be logged in to vote
Rating:3.7 (14 Votes)
Description:
I think this is good enough to upload ;)

This is a Hunter helicopter that will fallow the race lieder trying to kill him (but it may accidentally kill other players too).
Of course this script works only with the race gamemode.
You can start it globally (this will work on any race map) or include it to a specific map (add: <include resource="race_huntbot" /> to maps meta.xml)

this script started ass an experiment and it turned out better then I expected, the only issues I notice are: �sometimes when facing a player it rotates wrong way (eg 315deg instead of 45geg)�- this may be fixed in the future; �it fly thro objects (buildings, ect.)�- I don�t want to fix it :P

ok the rotation problem is fixed ;)

New in version 1.1:

- added the x rotation support depending on the bot speed, this makes the bot look more natural (no more things like in the video on 1:45).
- bot will only shoot when in first player sync range.
- fixed some annoying bugs.
- added the settings system including:
<setting name="#modspeed" value="20" /> - unit - non; accepted value >= 0; default – 20; this value is used to predict the passable player position, the larger this value, the longer will be the distance between the player and the calculated position (proportional to the player speed)
<setting name="#aispeed" value="5.2" /> - unit – [s]; ; accepted value >= 0.5; default – 5.2; this is the ai loop refresh rate, the lower this value, the more actual information’s about the player (in not recommend to set this to low though, creating a instant killing machine is not to fun for the racers).
Note that messing with above values may improve or screw up the bot ai, when you change one of them you should change the other ass well (if you increase one and decrease the other, you will screw up for shore).
<setting name="#speedlimit" value="150" /> - unit – [km/h]; value >= 10; default – 5.2; bot will not go faster then that.
<setting name="#starthuntdely" value="25" /> - unit – [s]; value >= o; default – 25; how many seconds bot should wait after the map starts (race countdown displays “GO”).
<setting name="#huntpause" value="30" /> - unit – [s]; value >= 5; default – 30; how many seconds bot should wait after detecting the first player death (bot may not detect first player death, if map respawn time is lower than bot aispeed).

Bot will search for the settings in maps meta.xml (you don’t need to add all the settings there, just the ones you want to change), if there are no settings there, it will search them in his own meta.xml (you may use the resource meta.xml ass global settings), if this settings are somehow wrong, it will use the default from the lua file.

- other changes (this version is using functions from the fallowing resources: mapmanager; missiontimer)

Known problems:

When a new player joins while bot is waiting, recourse missiontimer will post warnings…


discuss: http://forum.mtasa.com/viewtopic.php?f=108&t=28846

video: http://www.youtube.com/watch?v=RO9wrI73qwY
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
1.1.0 2010-10-10 11:41:17 added the settings system and other hanges Download
1.0.1 2010-08-18 17:37:45 Fiksed the rotation problem Download
1.0.0 2010-08-17 22:14:54 First public release Download