Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

A few api suggestions

Joined
Jan 4, 2014
Messages
10
A few suggestions for Players.getLocal

#isAnimating
#isMoving
#isUnderAttack

I know these can already be done, but it would be nice if it was in the official api :)
 
Joined
Nov 3, 2013
Messages
277
isAnimating -> getAnimationId() != -1
isMoving -> getSpeed() != 0
isUnderAttack -> getCombatGauge() != null

is it rly that hard
 
Last edited:
Joined
Mar 17, 2014
Messages
6
Imo: Should be closed @Quantum. As it's very easy to do, and if someone would like it to be done that way could simply do it locally.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,774
While it is indeed very simple to do these things, to the beginner scripter it may not be quite as obvious of a solution and therefore i think it should be added to the api.
 
Joined
Mar 17, 2014
Messages
6
While it is indeed very simple to do these things, to the beginner scripter it may not be quite as obvious of a solution and therefore i think it should be added to the api.
If a beginner scripter can't figure this out, then frankly how are they going to figure out other things? I'd rather someone who doens't know what they're doing ask questions on how to check animation, check for objects, npc's, or more then to have every bit of code spoonfed to them hindering their learning.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,774
If a beginner scripter can't figure this out, then frankly how are they going to figure out other things? I'd rather someone who doens't know what they're doing ask questions on how to check animation, check for objects, npc's, or more then to have every bit of code spoonfed to them hindering their learning.
It's not being spoonfed. The whole point of an api is to make things as easy and understandable as possible. This method would simply take the numbers out of the equation and make it easier for the untrained eye of a beginner scripter to understand what's going on in a script.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
Also makes it marginally more readable. How about documenting the convenience method with the "proper" method? For example...

// Equivalent to getAnimationId() != -1
public static boolean isAnimating() {

I feel this encourages learning and discovery of new methods, while still offering the intended convenience.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,774
Also makes it marginally more readable. How about documenting the convenience method with the "proper" method? For example...

// Equivalent to getAnimationId() != -1
public static boolean isAnimating() {

I feel this encourages learning and discovery of new methods, while still offering the intended convenience.
Good idea :)
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
Also makes it marginally more readable. How about documenting the convenience method with the "proper" method? For example...

// Equivalent to getAnimationId() != -1
public static boolean isAnimating() {

I feel this encourages learning and discovery of new methods, while still offering the intended convenience.
>static
 
Top