Page 1 of 1

Do bots "key bind"? & Simulated Functions?

Posted: Fri Mar 27, 2015 9:28 am
by Unknown
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?

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

Posted: Fri Mar 27, 2015 9:49 am
by Sp0ngeb0b
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

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

Posted: Fri Mar 27, 2015 7:47 pm
by Unknown
Yeah, that's what I thought. Thank you SpongeBob.