Do bots "key bind"? & Simulated Functions?

Discussions about Coding and Scripting
Post Reply
Unknown
Average
Posts: 48
Joined: Sun Mar 08, 2015 1:16 am

Do bots "key bind"? & Simulated Functions?

Post by Unknown » Fri Mar 27, 2015 9:28 am

Do Bots & other Pawns use Key Binds?
I am working on an item, extension from the Relics, that heals upon pressing a key set by the user, but can Bots use this manual healing or do I have to code it differently for them?

Also, what's the difference between a Function and a Simulated Function?

User avatar
Sp0ngeb0b
Adept
Posts: 289
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne

Re: Do bots "key bind"? & Simulated Functions?

Post by Sp0ngeb0b » Fri Mar 27, 2015 9:49 am

1) No, all non-PlayerPawn do not use Keybinds, as they are controlled by the game (server) and therefore perform specific actions directly through functions and code segments. You'll have to adress that "dynamic" use of the item for bots differently; detect the moment bots want to perform the healing manually (e.g. by checking the bot's health in regular time periods) and then use the item as desired.

2) The "simulated" keyword means that the function can be called client-side. You won't need this for singleplayer games, but as soon as you are going to a server-client environment, you need to be carefull what's gonna be processes server-side only and what actually needs to be performed client-side. Note that the simulated keyword won't actually call the function clientside; it just indicates the function can theoretically be called client-side. You should read the following to understand better:
Simulated Functions
Replication
******************************************************************************
NexgenAdvancedBanManager || NexgenPlayerLookupSystem || NexgenTeamspeak3Connector
******************************************************************************
Image

Unknown
Average
Posts: 48
Joined: Sun Mar 08, 2015 1:16 am

Re: Do bots "key bind"? & Simulated Functions?

Post by Unknown » Fri Mar 27, 2015 7:47 pm

Yeah, that's what I thought. Thank you SpongeBob.

Post Reply