Advanced VCEDescriptionAfter finding that default Variable Conditional Events had no Sin, Cos, or Tan functions, I made a brick which basically you relay and it calculates the sin, or cos of whatever you send it. However, i got fed up with having to set them up, so I made an extension to VCE.
EventsSelf Output: VCE_AdvModVar > "Target list", "Variable Name", "Logic", "Second Variable/Number"Target List is the same as VCE_ModVar; Self, Player, Client, Minigame, Vehicle.
Variable Name is the name of the variable to change.
Logic is what you want to change in the variable; Sin, Cos, Tan, DegToRad, RadToDeg, FloatLength, VectorAdd, VectorSub, VectorScale, VectorDist, VectorLen, VectorNormalize, GetSubStr, StrPos.
Second Variable depends on the Logic. For Sin, Cos, and Tan, putting "-1" in this will change it to Inverse Sin, Cos, or Tan. FloatLength sets the amount of decimal places the variable can go to. VectorAdd, Sub, Scale, Dist needs vectors. GetSubStr accepts one or two words. If only one number is given, it will get everything afterwards.
Self Output: VCE_Expression > "Expression", "Expression", "Expression", "Expression"Allows you to combine a crapton of lines into one. Its basically a programming language in an event. Massively WIP, don't get too attached.
Currently includes: + - * / Sin, ASin, Cos, ACos, Tan, ATan, DegToRad, RadToDeg, FloatLength, <var:x:y>, x%y, =x%y. x%y is my own variable replacers, target%variable. Target can be B/Brick/S/Self for Brick variables. P/Player for player. C/Client/[blank] for client, M/Minigame, V/Vehicle. Using =x%y sets the variable, otherwise it will get the variable. If you don't understand, don't use it.
Eg. "<var:player:yaw> degToRad sin * 5 =C%AimVectorY" This gets the players yaw, converts it into radians, finds the sin of it, multiplys it by 5, then sets the client variable "AimVectorY" to the result.
Self or Player Output: VCE_raycast > "Setting", "Vector", "Range", "Targets"Fires a raycast in the given direction. Setting modifies what the Vector does. World, Forward (For player target), and Variable (Brick/Player:rcvec). The raycast then outputs details into variables brick or player: 'rctype' type of object hit. 'rcpos(x,y,z)' position raycast hit. 'rcdist(x,y,z)' Distance from starting position.
If range is set to 0, it will use the vectors distance. If not it will only go as far as the range. Targets is what to look for, Bricks, Players, or Vehicles, or any combination of the three. If the raycast hits something, it triggers OnVCERaycast.
Note: Does not detect the non-brick ground!
Input: onVCERaycast > Targets Self, Player, Client, Minigame, TargetBrick, TargetPlayer, TargetClient, TargetVehicleTriggered when a raycast hits an object. Use to affect objects from another brick without namedbricks, relays, projectiles, you name it. Only works on the owners bricks.
Generally if you do not understand something in this, don't use it.Variable ReplacersPlayer- rhealth - Rounded Health (Ceiled)
- renergy - Rounded Energy (Ceiled)
- rdamage - Rounded damage (Floored)
- pos - Position (X, Y, Z)
- state - State (Honestly, no idea..)
- isPassenger - If the player is a passenger in a vehicle/bot
- isDriver -If the player is driving a vehicle/bot
- altFire - If the player is Alt Firing
- veDamage - Mounted Vehicle's damage
- veHealth - Mounted Vehicle's health
- veMaxHealth - Mounted Vehicle's max health
- veDatablock - Mounted Vehicle's datablock
- weDamage - Currently equipped weapons projectile damage
- weRadiusDamage - Currently equipped weapons explosion damage
- weDamageRadius - Currently equipped weapons explosion range
- weSpeed - Currently equipped weapons projectile speed
- weArc - Currently equipped weapons projectile gravity/weight
- item6 - Item name in slot 6
- item7 - Item name in slot 7
- item8 - Item name in slot 8
- item9 - Item name in slot 9
- item10 - Item name in slot 10
- yaw - Players yaw 0 - 360 degrees
- pitch - Players pitch -90 - 90 degrees
Brick- pos - Position (X, Y, Z)
- type - Brick type (Tab in Brick GUI)
Vehicle- pos - Position (X, Y, Z)
- yaw - Vehicles yaw 0 - 360 degrees
- pitch - Vehicles pitch -90 - 90 degrees
Still no vehicle roll..
Global- simSecond - The second since the server started (Floored)
- simMinute - The minute since the server started (Floored)
- simHour - The hour since the server started (Floored)
Black = Credits to me.
Yellow = Credits to Boom.
Red = Credits to Clockturn / M
NOTE: Most of these Replacers are from other Packs. Disable "Event_MoreVariableReplacers", and "Event_VCEReplacers".I have asked Clockturn (M), and he said that I can use the Yaw and Pitch from his pack, however Boom hasn't been online for a while, and i cant find him on the forums. If he asks me to, i will remove his replacers, and tell you to get his instead.Beta Testers needed!Keep an eye out for my server.
Future UpdatesRewrite of the Expression, a lot more features, who knows what else.