(Angel/Java)Script dump

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Angelscript dump

Post by Korban3 » Mon Jan 23, 2012 6:44 pm

Teh updatez?
Well, the recent ones will work for what I need right now.

User avatar
learn_more
Posts: 158
Joined: Tue Mar 15, 2011 6:32 am

Re: Angelscript dump

Post by learn_more » Fri Feb 03, 2012 6:05 pm

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()
  };
};
Attachments
a167.zip
(64.57 KiB) Downloaded 229 times

User avatar
Johannes
Posts: 1374
Joined: Thu Dec 18, 2008 1:26 am
Contact:

Re: Angelscript dump

Post by Johannes » Sun Feb 05, 2012 4:21 am

Excellent, much appreciated as always my friend =)

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Angelscript dump

Post by Korban3 » Sun Feb 05, 2012 4:24 pm

Yay! :D

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 7:02 am
Location: Estonia

Re: Angelscript dump

Post by last » Mon Feb 27, 2012 4:54 pm

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.

User avatar
vallejo18
Posts: 122
Joined: Tue Oct 11, 2011 11:31 am
Location: Peaches and Buttercups

Re: Angelscript dump

Post by vallejo18 » Sat Mar 17, 2012 11:50 pm

I know that " f " would infer to distance but what would indicate height? also what does " e " represent?

User avatar
SteelRaven7
Posts: 681
Joined: Sat Sep 26, 2009 4:02 pm
Location: Sweden

Re: Angelscript dump

Post by SteelRaven7 » Sun Mar 18, 2012 4:37 am

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.

User avatar
vallejo18
Posts: 122
Joined: Tue Oct 11, 2011 11:31 am
Location: Peaches and Buttercups

Re: Angelscript dump

Post by vallejo18 » Sun Mar 18, 2012 12:47 pm

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.......

User avatar
SteelRaven7
Posts: 681
Joined: Sat Sep 26, 2009 4:02 pm
Location: Sweden

Re: Angelscript dump

Post by SteelRaven7 » Sun Mar 18, 2012 1:02 pm

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.

User avatar
vallejo18
Posts: 122
Joined: Tue Oct 11, 2011 11:31 am
Location: Peaches and Buttercups

Re: Angelscript dump

Post by vallejo18 » Fri Mar 23, 2012 12:56 am

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;
}

User avatar
learn_more
Posts: 158
Joined: Tue Mar 15, 2011 6:32 am

Re: Angelscript dump

Post by learn_more » Sun Mar 25, 2012 3:21 pm

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)
  };
};
Attachments
a172.zip
(66.21 KiB) Downloaded 219 times

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 7:02 am
Location: Estonia

Re: Angelscript dump

Post by last » Sun Mar 25, 2012 3:24 pm

Hey, thanks, this helps allot.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Angelscript dump

Post by Korban3 » Tue Apr 03, 2012 5:36 pm

Yay! Learn_more isn't dead! Thank goodness. He was starting to do updates like I do them.

User avatar
learn_more
Posts: 158
Joined: Tue Mar 15, 2011 6:32 am

Re: Angelscript dump

Post by learn_more » Fri Apr 06, 2012 12:46 pm

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()
  };
};
Attachments
a174.zip
(65.82 KiB) Downloaded 231 times

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Angelscript dump

Post by Korban3 » Fri Apr 06, 2012 3:57 pm

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)

Post Reply