Permalink
Browse files

Fix spawn_entity() arg limit and add an example usage

  • Loading branch information...
PseudoKnight committed Aug 10, 2018
1 parent e39a8b5 commit 20cdb2358938ca01e0a40d79835c6a305827c4cd
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/main/java/com/laytonsmith/core/functions/EntityManagement.java
@@ -1213,7 +1213,7 @@ public String getName() {
@Override
public Integer[] numArgs() {
return new Integer[]{1, 2, 3};
return new Integer[]{1, 2, 3, 4};
}
@Override
@@ -1239,6 +1239,16 @@ public String docs() {
public CHVersion since() {
return CHVersion.V3_3_1;
}
@Override
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Applying entity attributes before adding it to the world.",
"spawn_entity('ZOMBIE', 1, ptarget_space(),"
+ " closure(@id){ set_entity_spec(@id, array('baby': true)); set_entity_ai(@id, false); })",
"Creates a zombie, changes it to a baby zombie without AI, then adds it to the world."),
};
}
}
@api

0 comments on commit 20cdb23

Please sign in to comment.