Page 3 of 6

Re: Angelscript dump

Posted: Mon Jan 23, 2012 6:44 pm
by Korban3
Teh updatez?
Well, the recent ones will work for what I need right now.

Re: Angelscript dump

Posted: Fri Feb 03, 2012 6:05 pm
by learn_more
seems that i missed a few :mrgreen:

Code: Select all

Changes from a164 to a167.

VM shared {
  MovementObject {
    + Function: int GetAttachedWeaponID(int)
    + Function: int GetNumAttachedWeapons()
    + Function: void DetachAllItems()
    + Function: void SheatheItem(int)
    + Function: void UnSheatheItem(int)
    - Function: int GetWeapon()
    - Property: int weapon_id
  };
  ItemObject {
    + Function: vec3 GetLinearVelocity()
    + Function: vec3 GetAngularVelocity()
    + Function: void SetAngularVelocity(vec3)
    + Function: void SetVelocity(vec3)
    + Function: void SetThrown()
    + Function: bool HasSheatheAttachment()
  };
};

Re: Angelscript dump

Posted: Sun Feb 05, 2012 4:21 am
by Johannes
Excellent, much appreciated as always my friend =)

Re: Angelscript dump

Posted: Sun Feb 05, 2012 4:24 pm
by Korban3
Yay! :D

Re: Angelscript dump

Posted: Mon Feb 27, 2012 4:54 pm
by last
can you make a update for that dump? I noticed that there are some new commands and also there are some that don't work anymore.

Re: Angelscript dump

Posted: Sat Mar 17, 2012 11:50 pm
by vallejo18
I know that " f " would infer to distance but what would indicate height? also what does " e " represent?

Re: Angelscript dump

Posted: Sun Mar 18, 2012 4:37 am
by SteelRaven7
vallejo18 wrote:I know that " f " would infer to distance but what would indicate height? also what does " e " represent?
Um, if you mean the "f" in something like: 10.0f, that's just there to imply that the number is a float, and not a double. Both coordinates and distances and pretty much everything else uses floats, which is why almost all numbers are written in that way.

Re: Angelscript dump

Posted: Sun Mar 18, 2012 12:47 pm
by vallejo18
SteelRaven7 wrote:
vallejo18 wrote:I know that " f " would infer to distance but what would indicate height? also what does " e " represent?
Um, if you mean the "f" in something like: 10.0f, that's just there to imply that the number is a float, and not a double. Both coordinates and distances and pretty much everything else uses floats, which is why almost all numbers are written in that way.
im not too knowledable on scripting but how should i set action if a enemy is a "x" amount of height. Example: if the player reaches this height, then the enemy should do this.......

Re: Angelscript dump

Posted: Sun Mar 18, 2012 1:02 pm
by SteelRaven7
vallejo18 wrote:im not too knowledable on scripting but how should i set action if a enemy is a "x" amount of height. Example: if the player reaches this height, then the enemy should do this.......
To get the position of the character, and compare it to a height, use:

Code: Select all

[aschar.as]

vec3 position = this_mo.GetAvgIKChainPos("torso"); //Returns the position of the player's torso.

if(position.y > 9000.0f) {
	DoStuff();
}
This code will check if the player's altitude is more than 9000.

Re: Angelscript dump

Posted: Fri Mar 23, 2012 12:56 am
by vallejo18
SteelRaven7 wrote:
vallejo18 wrote:im not too knowledable on scripting but how should i set action if a enemy is a "x" amount of height. Example: if the player reaches this height, then the enemy should do this.......
To get the position of the character, and compare it to a height, use:

Code: Select all

[aschar.as]

vec3 position = this_mo.GetAvgIKChainPos("torso"); //Returns the position of the player's torso.

if(position.y > 9000.0f) {
	DoStuff();
}
This code will check if the player's altitude is more than 9000.
Yep, i have no idea how to apply this, each time i would get vec&float dont have a conversion. And when i get it to shut up, it does not does anything. Just like if i use for health

if(blood_health > 5.0f){
return true;
}

Re: Angelscript dump

Posted: Sun Mar 25, 2012 3:21 pm
by learn_more
turns out i was not dead :mrgreen:

Code: Select all

Changes from a167 to a172.

VM playercontrol {
  + GlobalFunction: void SendMessage(int, string)
  - GlobalFunction: int QueryLevelIntFunction(string)
  - GlobalFunction: void SendLevelMessage(string)
  - GlobalFunction: void SendLevelMessage2(string, string)
  + GlobalProperty: Level level
  + GlobalProperty: int _editor_msg
  + Object: Level
};
VM cam {
  GUI {
    + Function: void Execute(uint32, string)
    + Function: void MoveTo(uint32, int, int)
    - Function: void CallFunction(uint32, string)
  };
};
VM level {
  + GlobalFunction: void SendMessage(int, int, vec3, vec3)
  + GlobalFunction: void SendMessage(int, string)
  + GlobalProperty: int _plant_movement_msg
  + GlobalProperty: int _editor_msg
  + GlobalProperty: HUDImages hud
  GUI {
    + Function: void Execute(uint32, string)
    + Function: void MoveTo(uint32, int, int)
    - Function: void CallFunction(uint32, string)
  };
  + Object: HUDImage
  + Object: HUDImages
};
VM shared {
  + GlobalFunction: string join(const array<string> &in, const string &in)
  + GlobalFunction: void PlaySoundGroup(string)
  + GlobalFunction: bool GetSplitscreen()
  + GlobalFunction: int GetScreenWidth()
  + GlobalFunction: int GetScreenHeight()
  string {
    + Function: uint length() const
    + Function: void resize(uint)
    + Function: string substr(uint start = 0, int count = -1) const
    + Function: int findFirst(const string &in, uint start = 0) const
    + Function: int findLast(const string &in, int start = -1) const
    + Function: array<string>@ split(const string &in) const
    - Function: uint length() const
    - Function: void resize(uint)
    + Behaviour: asBEHAVE_CONSTRUCT
  };
  array<class T> {
    + Function: void sortAsc()
    + Function: void sortAsc(uint, uint)
    + Function: void sortDesc()
    + Function: void sortDesc(uint, uint)
    + Function: void reverse()
    + Function: int find(const T&in) const
    + Function: int find(uint, const T&in) const
  };
  MovementObject {
    + Function: void Execute(string)
  };
};

Re: Angelscript dump

Posted: Sun Mar 25, 2012 3:24 pm
by last
Hey, thanks, this helps allot.

Re: Angelscript dump

Posted: Tue Apr 03, 2012 5:36 pm
by Korban3
Yay! Learn_more isn't dead! Thank goodness. He was starting to do updates like I do them.

Re: Angelscript dump

Posted: Fri Apr 06, 2012 12:46 pm
by learn_more

Code: Select all

Changes from a172 to a174.

VM shared {
  MovementObject {
    + Function: int GetIntVar(string)
    + Function: float GetFloatVar(string)
    + Function: bool GetBoolVar(string)
    - Function: int IsKnockedOut()
    - Function: void PassIntFunction(string, int)
    - Function: float QueryFloatFunction(string)
    - Function: void PassFloatFunction(string, float)
    - Function: int IsDucking()
  };
  ItemObject {
    + Function: int StuckInWhom()
  };
};

Re: Angelscript dump

Posted: Fri Apr 06, 2012 3:57 pm
by Korban3
Oh no! David removed PassInt? Ah! I don't know how to use Execute! Crap!
Thanks for the update learn_more! You're awesome 8)