I have some problems with world.callScriptedEntity. Im using this code Code: world.callScriptedEntity(id, "entity.say", "hi") where id contains a valid npcs id and everything works fine. When I try Code: world.callScriptedEntity(id, "entity.setVelocity", {0, 20}) or Code: world.callScriptedEntity(id, "entity.setVelocity", {0, 20}) nothing happens.
worked, thanks. but why does the official wiki say that setVelocity is member of entity if it really is member of mcontroller?
I'm not going to say what's written there is wrong (it could very well apply for different types of entities), but keep in mind that the Wiki can also contain outdated information: http://starbounder.org/mediawiki/index.php?title=Modding:Lua/Tables/Entity&action=history For example, in tech scripts the only values/functions found inside the entity table are: entity.id, entity.damageTeam, entity.distanceToEntity, entity.isValidTarget, entity.entityInSight, entity.closestValidTarget.