Colobot Wiki
Advertisement

Syntax:[]

ipf(int value)

Description:[]

The ipf() (Instructions Per Frame) function sets the desired number of instructions the current bot should execute between video frame updates, effectively increasing the execution speed of the program running on that bot. As such, this function can make the difference between life and death when calculating a firing solution for a fast-moving enemy.

As of Colobot 1.8 the default value of ipf() appears to be on the order of 200, and the maximum is 10,000 (passing any larger number as an argument produces the same results as passing 10,000).

Note that wait() and any function that causes animation to occur (grab(), move(), aim(), goto(), etc.) take the same amount of time regardless of ipf().

See also.[]

CBOT Language

Advertisement