Giter VIP home page Giter VIP logo

issues's People

Contributors

gtnardy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nogitsu

issues's Issues

Primitive props SetTintColor(...) doesn't change the color

Describe the bug
Primitive props SetTintColor(...) doesn't change the color

To Reproduce

  1. prop:SetTintColor(Color(100, 0, 0))
  2. Still grey

Prim props:

    primProps = {
        "/Game/NanosWorld/Maps/Development/Network/SM_Cube_01",
        "/Game/NanosWorld/Maps/Development/Network/SM_Cube_02",
        "/Game/NanosWorld/Maps/Development/Network/SM_Cube_03"
    }

Alpha color percentage is not working in Render Namespace

Describe the bug
The Alpha color percentage is not working.
According to the wiki :

Alpha color percentage (0-1). Alpha is the transparency. 0 -> fully transparency and 1 -> no transparency

So if we take GreyColor and code it to be half visible it should look like this :
Color(0.5, 0.5, 0.5, 0.5)
Adding it to a Render function it should display a grey color who is half transparent, but that's not the case.

To Reproduce
Steps to reproduce the behavior:

  1. Create in a Package, in the Client folder, a .lua file and put :
    Render.AddBox(50, Vector2D(500, 500), Vector2D(1000, 1000), 50, Color(0.5, 0.5, 0.5, 0.5))
  2. Launch the server and see.

Expected behavior
Instead of showing a fully non transparent color, it should show a half transparent color

Screenshots
https://falaxir.fr/nanos_world/issues/images/scripting_draw_box.PNG

Prop:ColorAddition(color) and Weapon:ColorAddition(color)

Is your feature request related to a problem? Please describe.
To blend textures with respective colors.
For example: every color can be displayed with a white barrel.

Describe the solution you'd like

Prop:SetColorAddition(color)
Weapon:SetColorAddition(color)

Add Highlight

Is your feature request related to a problem? Please describe.
Highlight distant objects, actors, meshes

Describe the solution you'd like
SomeActor:Highlight(Color, Thickness)
SomeStaticMesh:Highlight(Color, Thickness)

Describe alternatives you've considered

or a generic highlight

Global.Highlight(Actor, Color, Thickness)
image

Additional context
Add any other context or screenshots about the feature request here.

Character:SetLocation while in a vehicle

Describe the bug
Set the player location, while the player is in the vehicle, some weird things happens. The character stays in the animation and the camera movements are not correct.

To Reproduce
Steps to reproduce the behavior:

  1. Char enter vehicle
  2. Set Chars location*
  3. Weird things

*) If not reproducible, try the following:

char:SetMovementEnabled(false)
char:SetGravityEnabled(false)
char:SetLocation(Vector(0, 0, 3000))
char:SetCollision(1)

Expected behavior

  • No char animation
  • No weird camera movement (wasd)
  • Remove player from vehicle

Screenshots
Startet at Vector(0, 0, 3000) and push some wasd
image

Character IsRagdollMode(): bool

Is your feature request related to a problem? Please describe.
You can set the ragdol with SetRagdollMode(bool). So there is a setter, but a getter is missing.

Describe the solution you'd like
Maybe some char -> IsRagdollMode(): bool

Character speed

Is your feature request related to a problem? Please describe.
I'd like to change Character move speed and gait mode. Mainly to use in bots

Describe the solution you'd like

  • SetSpeed
  • SetGaitMode

Spawn generic unreal blueprint

Is your feature request related to a problem? Please describe.

Spawn generic blueprint actor that have blueprint functions. They don't need to be synced

Describe the solution you'd like

Prop("Package:BP_Something")

Additional context
This is good to create map interactions that don't need sync between players

SetGlassOpacity

Describe the bug
Putting values over 1 in the Vehicle:SetGlassOpacity() makes it opaque.. Like, really opaque

To Reproduce
Steps to reproduce the behavior:

  1. Spawn a car
  2. Put the glass opacity to 20
  3. See the windows
  4. Enter the car
  5. Don't see the road !

Expected behavior
Limit the opacity or just on the inside.

Screenshots
image

{entity}:SetPhysic()

Is your feature request related to a problem? Please describe.
Disable physics on entities, so that they dont fly around like with SetGravity(false)

Describe the solution you'd like

{entity}:SetPhysic(bool)
{entity}:IsPhysic(): bool

Add the option to turn on an on-screen FPS counter

Describe the solution you'd like
In many games, it's possible, to display an FPS counter as an alternative to such features available in for example Steam or GeForce Experience. Many games also add the options to perhaps view the CPU usage or the GPU temperature which might be good to have for the future, but right now, just being able to see the FPS might be very useful, especially for testers.

Throwables customization

Is your feature request related to a problem? Please describe.
I'd like to customize throwables in lua.

Describe the solution you'd like

  • Set Model
  • Set if is explosive
  • Set explosion radius
  • Set explosion damage
  • Set explosion particles
  • Set explosion custom effect handled by an event in lua
    • i.e a temporary trigger in the explosion radius
    • this is used to make molotovs, freeze granades
  • onHit event
  • Set stickness
  • Set bounciness

Shared / Client files doesn't get delete when rejoin into a server.

Describe the bug
When you delete a file on the shared / client folder, inside your package, when you rejoin into the server, this file isn't deleted inside the Saved folder.

To Reproduce
Steps to reproduce the behavior:

  1. Create a package with some script inside the client / shared folder
  2. Join into the server.
  3. Leave the server
  4. Check the Saved folder (inside the nanos world client game folder).
  5. Restart the server (or reload the package)
  6. Remove that file inside your package folder, and rejoin into the server
  7. Check the Saved folder (inside the nanos world client game folder) you will see the file is not deleted (still there).

SetLightColor

Describe the bug
Light color isn't changing

To Reproduce
Steps to reproduce the behavior:

  1. Spawn a car
  2. Use Vehicle:SetLightColor( Color( 255, 0, 0 ) )
  3. Enter the vehicle

Expected behavior
The color should be red

Screenshots
image

Weapon Issues

Describe the bug

  1. If you give a player a weapon when dropping the weapon (Weapon:on("Drop"...)), the server says Weapon already picked up!. This means that when the event is called, the player still has the weapon. But the player should no longer have a weapon when the event is called (or?).
Weapon:on("Drop", function(wep, char)
    print("Drop...")
    char:PickUpWeapon(wep)
end)


  1. If you take the following code and pick up a weapon, on("Drop",...) is called only once and then never again. The weapon is not dropped and the player can no longer drop the weapon.
Weapon:on("PickUp", function(wep, char)
    char:Drop()
end)

Weapon:on("Drop", function(wep, char)
    print("Drop...")
end)


  1. Take this code, drop a weapon -> endless weapon spawn (crash [at]Server & [at]Client) (See no. 1: Maybe because the player already has a weapon and the server drops it?)
local origin = Vector( -630, -870, 188 )

Weapon:on("Drop", function(wep, char)
    weapon = Weapon( Vector( origin.X + 102, origin.Y, origin.Z ), Rotator( 0, 0, 90 ), "/Game/NanosWorld/Core/Weapons/Rifles/BP_Weapon_GE36.BP_Weapon_GE36_C" )
    char:PickUpWeapon(weapon)
end)

Post process editing

It should be a good idea to allow us to edit the post process effects with Lua to allow customizing the ambiance.

on( "Error" ) and Package:LogError( txt )

Describe the solution you'd like
A way to warn about a lua error in the client (and server ?) console + on( "Error" ) to allow some things on error (maybe printing the error on the screen ?)

Picture of the expected result
Error in the console

Describe alternatives you've considered
Maybe a Package:LogColor( color, text ) or with varargs to allow multiples colors like

Package:LogColor( Color( 1, 0, 0 ), "R", Color( 0, 1, 0 ), "G", Color( 0, 0, 1 ), "B" )

Examples
Example 1

if not Player:GetControlledCharacter() then
    Package:LogError( "No character controlled." )
end

Example 2

local error

on( "Error", function( msg )
    error = msg
end )

local pos = Vector2D( 5, 5 )
local scale = Vector2D( 1, 1 )
local color_red = Color( 1, 0, 0 )
local color_black = Color( 0,0, 0 )

on( "DrawHUD", function()
    if not error then return end
    Render.DrawText( "Error:" .. error, pos, scale, color_red, 0, color_black, scale, false, false, false, color_white )
end )

New Functions and Callbacks Ideas (DasPascal)

I know there is a template for feature requests, but I am now creating a table, because otherwise there is too much text for simple things.

Of course, many callbacks and methods are still missing. Let me just list my ideas here. These do not have to be implemented immediately. Just brainstorming...

Objects

  • Color with alpha (r,g,b,a) (Maybe useful if you want to have transparent vehicles or props (for racing, etc.)

Functions

No. Name Description
1.1 Player:GetPing Get the players ping
1.2 Character:Get/SetCollision(...) Set collision for other characters (!All other characters also have no collision to this character).
1.3 Vehicle:Get/SetCollision(...) Set collision for other vehicles and players (!Same see character)
1.4 Prop:Get/SetCollision(...) set collision for all (disable object collsion)
1.5 Vehicle:SetPassenger(player, seatId) Set player to a vehicle seat (seat: 0-> Driver, 1-X-> Passanger. If it is already taken, return false?
1.6 Vehicle:GetPassenger(seatId) return Character
1.7 Vehicle:Eject(seatId) Remove character by seatId from vehicle
1.9 NanosWorld.GetMaxPlayers Get max players on the server
1.10 Vehicle/Weapon/...:GetModel ...
1.11 X Vehicle/Weapon/...:SetModel("...") Maybe, if possible...
1.12 X Prop:SetAlpha(0..1) Sets the alpha color of an object
1.13 X Character:SetAlpha(0..1) Sets the alpha color of an character
1.14 X Vehicle:SetAlpha(0..1) Sets the alpha color of an character
1.15 Player:IsKeyPressed(keyCode) Returns true, if the key is pressed otherwise false
1.18 Player:Get/SetCamLocation(vec) Get / Set camera location
1.19 Player:Get/SetCamLookAt(vec) Get/Set camera looks at
1.20 Player:ResetCam() Reset camera to player character
1.21 Character:ToggleMovement(bool) Toggle players movement (Player can't walk, drive or move by any reason.
1.22 Character:IsMovementEnable() Returns true when the player can move, false otherwise
1.23 Vehicle:Horn(time) honk honk honk
1.24 {entity}:call("", args) Call a callback (for example player:on("xxx", ...)
1.25 Weapon:Reload() Reload the weapon (without animation or any character)
1.26 {entity}:Freeze(bool) Freeze the entity (Player, Vehicle, Props, Weapons, ...)(same as SetMovementEnabled, but freeze the player completely - If the player falls or jumps down from somewhere, this activity is frozen). Disable the Rigidbody (no physical movement anymore)
1.27 {entity}:IsFrozen(): bool If the entity is frozen.
1.27 Char:GetVehicle() Returns the vehicle of the char. Nil if not in a vehicle.

Callbacks

No. Name Description
2.1 Character:on("Shot", wep, char ) When the player operates a weapon
2.2 {entity}:on("Hit", char, entity, vec3) When a entity is hit. (char: by which character , entitiy: entity which was hit, vec3: Vector of the hit position)
2.3 Character:on("Die", char, (maybe: reason) ) When the player dies.
2.4 Player:on("KeyPress", char, keyCode ) When the player press a key.
2.5 Player:on("KeyDown", char, keyCode ) When the player hold down a key.
2.6 Player:on("KeyUp", char, keyCode ) When the player release a key.
2.7 Player:on("Start/EndRagdoll", char ) When the player starts the Ragdoll process.
2.8 Player:on("Jump", char ) When the player starts jumping
2.9 Player:on("LayDown", char ) When the player lay down (current z key)
2.10 Player:on("StandsUp", char ) When the player stand up again (After ragdol / lay down)
2.11 Server:on("SlowTick", ...) A slower tick update rate (maybe every 6 tick (I know, that everyone can do this by himself, but it would be great if this was already standard).
2.12 Player:on("StartSwim", char) When the player starts swimming.
2.13 Player:on("EndSwim", char ) When the player ends swimming.
2.14 Vehicle:on("StartHorn", char, veh ) When a player/script starts the vehicle horn.
2.15 Vehicle:on("EndHorn", char, veh ) When a player/script stop the vehicle horn.
2.16 Player:on("ViewmodeChanged", ... ) When a player view mode changed (key: v or via script).
2.17 Weapon:on("Reload", wep, char ) When a player/script reloads a weapon. (no player -> char = nil)

Async Functions

No. Name Description
3.1 Server:setTimeout(time, callback, repeat [, args]) Tasks after a specific time. Important: Repetition has to be done from the server side, because the callstack will overflow in Lua if it is repeated permanently (example: in a setTimeout, call the same setTimeout again...)
3.2 Server:runInThread(callback, args) Run the following 'callback' in a thread (Or something like that... Maybe run coroutines in a thread?)

Client Side (low prio)

No. Name Description
4.1 Raycast, traces traces on the world to get where it hits

All the collision stuff has a very low priority. Only for race (etc.) Server... If you have questions, reference the number of the row. โœŒ๏ธ

SetGravity /GetGravity

Is your feature request related to a problem?
For example if we scale down the player to make them small they're jump is small.
or if i want to simulate an other gravity on my map or on an area of it

Describe the solution you'd like
a function to set the gravity when walking and jumping and to get it

Additional context
When you scale down the player and walk around sometime he get is foot under the ground and you can't jump but on the other player around you they see you jump .

SetAmmoClip & SetAmmoBag

Describe the bug
I can shoot about 32 times with my G36 even when I used SetAmmoClip( 1 ) and SetAmmoBag( 1 ), but after reloading, I can shoot only once, reload, once and then can't reload.

To Reproduce
Steps to reproduce the behavior:

  1. Spawn a "/Game/NanosWorld/Core/Weapons/Rifles/BP_Weapon_GE36.BP_Weapon_GE36_C"
  2. Use SetAmmoClip( 1 ) and SetAmmoBag( 1 ) on spawned weapon
  3. Pick it up
  4. Shoot, reload, shoot, reload, shoot and then reload (yes, in this order)

Expected behavior
We should be able to shoot only once before reloading, and in this case we shouldn't be able to reload because of the AmmoBag set to 1

Arithmetic operations

Is your feature request related to a problem? Please describe.
I'm getting troubles with positionning because Vectors and Rotators don't have arithmetic methods.

Describe the solution you'd like
I'd like to see arithmetic operations on Vectors and Rotators ( add, substract, multiply, divide ) and maybe methods like Vector:Forward() :Right() :Up() and same for rotators.

Describe alternatives you've considered
local new_vector = Vector( old_vector.X + 100, old_vector.Y, old_vector.Z )

Client.SetMouseEnabled(true) Cause animation, controls, move bugs

Describe the bug
When using Client.SetMouseEnabled(true) and even after Client.SetMouseEnabled(false) , some weird things happen.
Walk infinitely, looping animation, ect.

To Reproduce
Steps to reproduce the behavior:

  1. Inside a package in the folder Client, create a lua file and place inside :
on("MouseUp", function(KeyName, MouseX, MouseY)
    if (KeyName == "LeftMouseButton") then
        Package:Log("Left Click pressed")
        Client.SetMouseEnabled(true)
    end
    if (KeyName == "RightMouseButton") then
        Package:Log("Right Click pressed")
        Client.SetMouseEnabled(false)
    end
end)
  1. Start the server, when you will do left click, you will punch, and punch, even after right click and pressing other keys.
    The only way to stop the animation is to press esc

See the video for other bugs, maybe there are some other bugs.

Video
Please enable subtitles so see what i am trying to do
https://www.youtube.com/watch?v=1t4B1fEXRwU

Game Version : 0.10.1

Add an interact with objects event

For creating buttons/doors/clicable things maybe it'll be a good idea to implement

Character:on("InteractProp", function(character, prop)

and a new property of the prop:

isInteractable() default false

Mouse targetting

Describe the solution you'd like
Functions for the mouse, like

  • mouse.Enable() to enable the cursor + disable movements
  • mouse.Disable() to disable the cursor + enable movements
  • mouse.GetPos() pretty explicit nah ? Just don't do like the Render.StrLen() which recreate a new Vector2D() each time

Dimension

Describe the solution you'd like
Adding Dimension like jc3mp or samp

Describe alternatives you've considered
player.dimension get/set int

Key bindings

Is your feature request related to a problem? Please describe.
Be able to customize my key bindings

Describe the solution you'd like
Client side to customize primary and secondary keybindings

test

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

New functions ideas

Function name Function description
Server.RunCommand( command ) Executes 'command' on the server
Entity:Remove() Removes an entity
Character:GiveWeapon( class ) Gives the player the weapon of "class"
Vehicle:ToggleLights() Toggles the lights
Vehicle:SetLightsEnabled( bool ) Set the if the lights are enabled or not
Vehicle:GetLightsEnabled() Get if the lights are enabled or not
Server.on( "PlayerJoins", player ) Event to get joining player
Server.on( "PlayerLeaves", player ) Event to get leaving player

Maybe more soon ? :p

Render & Client functions Ideas (UI, ...)

Introduction
This is a big list of my ideas to improve and add new functions for UI
For now, only for client interface, but maybe later, include some of them to render directly into the server so that everyone can see (ex : Text displays name of pnj, circle on the ground for entity interaction like create/destroy car, ect)
I know that some functions of parameters will not be possible for now due to limitations.

Notes:
This list can be updated by me at anytime to precise some functions or add new ones
I use n for numbers
And sorry for my mistakes in this long message
It may be possible that i forgot some parameters in the functions
Also, some functions can be useless sometimes.

Before that, some bugs (not tested since discovered)

- Alpha color is not working

Now, good reading :)


This is a list for modifying existing functions

Before After Description
AddBox(number ID, Vector2D StartPosition, Vector2D EndPosition, number Thickness, Color Color) AddBox(number ID, Vector2D StartPosition, Vector2D EndPosition, number Thickness, Color ThicknessColor, boolean isfilled, Color fillcolor) Added if the box is filled with a defined color

NEW Functions that draws something

Function Name Function description
AddConvexshapes(number ID, struct Locations, number ThicknessBorder, Color ThicknessBorderColor, boolean isfilled, Color fillcolor) Draws a Convex shapes where each point is related so for example 0 with 1, 1 with 2 , ect, and the last one with the first one, locations (Vector2D) are stored in a structure so struct[0], struct[n] until nill
AddImage(number ID, string ImageLocation, Vector2D Position, number Scale, Vector2D putcustomsize, number Opacity, boolean backgcolor, Color backgrcolor) Draws a image, can be .png, .jpg, or even animated (.gif), opacity (0-255), if putcustomsize is null, take origin image size
AddTextInput(number ID, Vector2D Position, string Basetext, number fontid, number fontsize, number CharacterLimit, Vector2D MaxCharSize) Add a small text input with a number of maximum characters that can be put and MaxCharSize is defined by the number of characters of each width & height
AddNumberInput(number ID, Vector2D Position, number NumberInside, number fontid, number fontsize, number CharacterLimit, Vector2D MaxCharSize) Add a small Number input with a maximum number limit and MaxCharSize of each width & height
AddButton(number ID, Vector2D StartPosition, Vector2D EndPosition, string Text, Color TextColor, number ThicknessBorder, Color ColorThicknessBorder, boolean isfilled, Color fillcolor, Color HoverColor) Add a simple button, for HoverColor if isfilled is false then this color will be the ColorThicknessBorder when mouse hover the button, else, it will be the fillcolor
AddImageButton(number ID, string ImageLocation, Vector2D Position, number Scale, Vector2D Size, number Opacity, Color outlinehover, boolean backgcolor, Color backgrcolor) Add a simple image button, image is stretched if Size X or Y is not the same as the image, opacity (0-255)
AddColorPicker(number ID, Vector2D StartPosition, Vector2D EndPosition, Color Background) Add a simple color picker box of all RGBA value where player can choose the color he wants : example
AddBinder(number ID, Vector2D StartPosition, Vector2D EndPosition, string DefaultBind, Color TextColor, number ThicknessBorder, Color ColorThicknessBorder, boolean isfilled, Color fillcolor, Color HoverColor) Add a simple binder for changing controls, so when clicking, it will displays press any key to bind when clicking, replace the old bind key by the new one
AddTable(number ID, Vector2D Position, Vector2D BoxSize, Vector2D TableSize, number ThicknessBorder, Color ThicknessColorBorder, boolean isfilled, Color fillcolor) Add a simple Table where each box of the table have a custom size and how much of them per width and height
AddSlider(number ID, Vector2D StartPosition, Vector2D EndPosition, string ImageForOptionalCustomSliderIndicator, number DefaultValue, number SlideMinValue, number SlideMaxValue, Color LineColor, number ThicknessBorder, Color ColorThicknessBorder, boolean hasbackgrcolor, Color backgrcolor) Add a simple slider with max and min values
AddModelPanel(number ID, Vector2D StartPosition, Vector2D EndPosition, string ModelLocation, number ThicknessBorder, Color ColorThicknessBorder, boolean hasbackgrcolor, Color backgroundcolor, boolean usercaninteract, Vector DefaultCameraPos, Rotator DefaultCameraRotation ) Add a model panel to view a model in 3d, it can be a prop/weapon or a character. For example like sketchfab model viewer
AddCheckBox(number ID, Vector2D StartPosition, Vector2D EndPosition, number ThicknessBorder, Color ColorThicknessBorder, boolean isfilled, Color fillcolor) Add a simple checkbox

NEW events
Not sure about theses one in the events.

Event Description
Button:on("Click", function( number id, type button) Event when a button is clicked, button type is normal or image
Button:on("Hover", function( number id, type button) Event when a button is hovered, button type is normal or image

Add custom events, pls


NEW get functions

Returns Function Description
Vector2D GetConvexshapesPixels( number ID) Get the size of a Convexshapes in pixels (only a giant square for the points in x,y extremity)
Vector2D GetButtonSizePixels( number ID) Get the size of a button (can be a normal or image one)
Vector2D GetTableCaseSize( number ID) Get the size of 1 box of the table of Render.AddTable
Vector2D GetTableAllSizeNumber( number ID) Get the size of the entire table of Render.AddTable
Vector2D GetTableAllSizePixels( number ID) Get the size of the entire table in pixels of Render.AddTable
boolean GetCheckBoxResult( number ID) Get if the checkbox is true or false Render.AddCheckBox
Vector2D GetCheckBoxSize( number ID) Get checkbox size in pixel of Render.AddCheckBox
string GetTextInputOutput( number ID) Get the text input output of a Render.AddTextInput
Vector2D GetEntireTextInputSize( number ID) Get the entire text input size in pixels of a Render.AddTextInput
number GetTextInputLenght( number ID) Get the text input leght of a Render.AddTextInput
number GetNumberInput( number ID) Get the number set on the Render.AddNumberInput
Vector2D GetSliderSizePixels( number ID) Get the size in pixels of Render.AddSlider
number GetSliderNumber( number ID) Get the number set on the Render.AddSlider
number GetSliderPositionPercentage( number ID) Get the distance travelled by the slider where left is 0% and right is 100%
string GetModelInPanel( number ID) Get model displayed on a Render.AddModelPanel
Vector GetPanelModelCameraLocation( number ID) Get camera location on Render.AddModelPanel
Rotator GetPanelModelCameraRotation( number ID) Get camera rotation on Render.AddModelPanel
Vector2D GetEntirePanelModelSize( number ID) Get the entire PanelModel size in pixels of a Render.AddPanelModel
Vector2D GetBindSizePixels( number ID) Get the bind size button in pixels of a Render.AddBinder
string GetBind( number ID) Get the bind of a Render.AddBinder
Color GetColorCodePicked( number ID) Get color set by Render.AddColorPicker
Vector2D GetColorPickerSize( number ID) Get ColorPicker size in pixel by Render.AddColorPicker
Vector2D GetImageSize( number ID) Return the size of a image (transformation included) - CLIENT
number GetImageOpacity( number ID) Return the opacity of the image - CLIENT
string GetImageName( number ID) Return the name of the image (path) - CLIENT
Vector2D GetImageOriginSize( number ID) Return the size of a image origin (no transformation) - CLIENT
Vector2D GetPlayerScreenSize() Return the resolution of client screen, usefull to avoid draws outside player screen - CLIENT
Vector GetCharacterCameraLocation() Return the camera location of the character - CHARACTER
Rotator GetCharacterCameraRotation() Return the camera rotation of the character - CHARACTER
Vector GetCharacterCameraLookingAtLocation() Return the position where the character is looking at - CHARACTER
String GetModelNameCharacterLookingAt() Return modelname of the prop where the character is looking at - CHARACTER

NEW set functions

Function Description
SetCharacterCamera( Character Character, number ViewMode, Vector NewCameraPos, Rotator NewCameraRotation) Move the position of the actual player camera to a defined one (example look to a object, camera facing the character face for character modification, ect) NOTE: if ViewMode is other than 0 (no fps), camera location is the center where the camera can look around
SetCharacterCameraToDefault( Character Character, number ViewMode) Reset the player camera back to default

Draw in the map
Add possibility to draw and interact with UI elemements like in the screen but instead of being draw on the screen, theses can be draw on the server, in the map so for example in the map, in a certain location, a image when we can interact with it and draw buttons on it that can be interactive when the cursor is inside or when we click.


Voila, this thing cost me too much time, but here it is
If you have any suggestions, comment below
And sorry if sometimes i am not clear (or english mistakes :/)
Thanks.




EDITS
EDITS
EDITS
here i will make some editings

20:56 15/05/20
It could be good to add server redirection, for example when creating gamemode, some type of gamemode can require different servers to help seperate games.

Returns Function Description
ConnectToServer( number ip, number port, string passwordIfAny) Connect to a server with this ip and port and password
boolean IsServerActive( number ip, number port) Check if the server is online or offline
string ServerGetName( number ip, number port) Get the server name
string ServerGetDescription( number ip, number port) Get the server description
number ServerGetMaxSlots( number ip, number port) Get the server maximum slots
number ServerGetSlotsCurrentPlayers( number ip, number port) Get the server current player number connected to server

Of course, need limitations to avoid DDOS attacks.
Also it can be good that there is possibility to connect to a seperate mysql databse for example grades between server, communication of multiple server for a gamemode (see the state of a game, ect) But only server file to avoid steal password

Audio
Yes audio, great, ability to play music files
Example of functions

Returns Function Description
AddAudio( number ID, string audiofile, number volume, boolean isloop) Create a audio file but don't play it, can support .ogg, .mp3, .wav
PlayAudio( number ID) Play a audio file from start
ResumeAudio( number ID) Play a audio file from last time it stoped, else start from begining
StopAudio( number ID) stop a audio file (but don't destroy it)
DestroyAudio( number ID) Destroy a audio file created with this ID
SetLoopAudio( number ID, boolean isloop) Set if audio is loop or not
SetVolumeAudio( number ID, number volume) Set audio volume
number GetVolumeAudio( number ID) Get audio volume
boolean GetLoopAudio( number ID) Get if audio is loop or not
string GetFileAudio( number ID) Get audio file

HTML frame
Play videos, url for info, communities, ect
Add a option to Nanos game settings to disable it.

Returns Function Description
AddHtml( number ID, string URL, Vector2D StartPosition, Vector2D EndPosition, number ThicknessBorder, Color ThicknessBorderColor) Add Html page
DestroyHtml( number ID) Destroys html or can be replace by ClearItem function
EnableAudioHtml( number ID, boolean audioplay) Enable audio for this html id
SetHtmlUrl( number ID, string URL) Set another html url
string GetCurrentHtmlUrl( number ID) Get current html url
string GetOriginHtmlUrl( number ID) Get origin html url (what defined by html creation)
boolean IsHtmlEnabled( number ID) Returns if the client enabled html
Vector2D GetHtmlSize( number ID) Get current html size in pixels
Vector2D GetHtmlLocation( number ID) Get current html location

Forgot to add some get function for UI
EDIT 16/05/20

Returns Function Description
Vector2D GetButtonCoordinates( number ID) Get the coordinates of a button (top left because there is a function to have the size in pixels)
Vector2D GetTableCoordinates( number ID) Get the coordinates of a Table (top left because there is a function to have the size in pixels)
Vector2D GetCheckBoxCoordinates( number ID) Get the coordinates of a CheckBox (top left because there is a function to have the size in pixels)
Vector2D GetTextInputCoordinates( number ID) Get the coordinates of a TextInput(top left because there is a function to have the size in pixels)
Vector2D GetNumberInputCoordinates( number ID) Get the coordinates of a NumberInput (top left because there is a function to have the size in pixels)
Vector2D GetModelPanelCoordinates( number ID) Get the coordinates of a ModelPanel (top left because there is a function to have the size in pixels)
Vector2D GetSliderCoordinates( number ID) Get the coordinates of a ModelPanel (top left because there is a function to have the size in pixels)
Vector2D GetImageCoordinates( number ID) Get the coordinates of a Image (top left because there is a function to have the size in pixels)
Vector2D GetBindCoordinates( number ID) Get the coordinates of a BindBox (top left because there is a function to have the size in pixels)
Vector2D GetColorPickerCoordinates( number ID) Get the coordinates of a ColorPicker (top left because there is a function to have the size in pixels)

And also events
Again not really sure about theses ones

Event Description
TypeInput:on("Click", function( number id, type input) Event when a input field is clicked, type is number or text (so TextInput or NumberInput)
TypeInput:on("Type", function( number id, type input) Event when a character/number is entered or deleted
TypeInput:on("Enter", function( number id, type input) Event when a player press enter when finish typing
ColorPicker:on("Pick", function( number id) Event when a player picked a color
Binder:on("NewBind", function( number id, type numberorcharacter) Event when a player set a new bind, type is if the new bind is a character or a number
Slider:on("Slide", function( number id) Event when a player slide the slider (so when value change)
CheckBox:on("Check", function( number id) Event when a player change is the checkbox is true or false
ModelPanel:on("ClickInteract", function( number id) Triggered when a player is interacting with the modelpanel, when he click inside the modelpanel to interact
ModelPanel:on("ClickExit", function( number id) Triggered when a player is not interacting with the modelpanel, when he click outside the modelpanel

Missing `grab` functionalities

Is your feature request related to a problem? Please describe.
I'm missing the following functions for the props.

Describe the solution you'd like

  • Character:GiveGrabbedProp(Prop)
  • Character:DropGrabbedProp()
  • Character:GetGrabbedProp(): Prop
  • Prop/Weapon:IsGrabbable() boolean
  • Prop/Weapon:SetGrabbable(boolean) -> if false -> no outline

Play sound

Is your feature request related to a problem? Please describe.
I'd like to play custom sounds via lua script

Describe the solution you'd like

  • SetVolume
  • SetPitch (maybe?)
  • Play
  • Pause
  • Loop

Vehicle ideas

Is your feature request related to a problem? Please describe.
Some vehicle stuff. See below...

Describe the solution you'd like

vehicle:SetEngineState(bool) -- Disable sound and block forward or reverse input
vehicle:GetEngineState(): bool -- getter ^

vehicle:SetHornAsset(string) -- sets the horn sound-asset
vehicle:GetHornAsset(): string -- getter ^

vehicle:SetLightState(bool) -- Turn on / off the lights
vehicle:GetLightState():bool -- getter ^

Damage indicators

Is your feature request related to a problem? Please describe.
I'd like to get visual indicator of the damage done, or a event to handle this in lua

Describe the solution you'd like
I'd like to have onDamage that returns how many damage I did to an Character or a thing.

Describe alternatives you've considered
Maybe directly done into C++?

Additional context
https://guides.gamepressure.com/apex-legends/gfx/word/103560812.jpg

{entity}:SetLocation(...) velocity

Describe the bug
Often the velocity is maintained when the location of an entity is changed.

To Reproduce
For example (character):

  1. Jump
  2. While u jump, SetGravityEnabled(false) and SetLocation(...)
  3. They u fly endlessly in the velocity direction... Bye bye character... ๐Ÿ‘‹

Expected behavior
If you set the location of an entity, then the velocity should be set to 0.

char:EnterVehicle()

Describe the bug
If the player enters a car and you want to move it to another seat, the server writes [2020-04-10 19:00:41][Error] Vehicle already entered!. The player is not moved to the other seat.

To Reproduce

  1. Take this code:
    Character:on("EnterVehicle", function(char, veh)
        char:EnterVehicle(veh, 2)
    end)
  1. Get into a vehicle as a driver.

Expected behavior
The player is placed in the scripted seat.

Grenade:Explode()

Is your feature request related to a problem? Please describe.
To explode a grenade via script

Describe the solution you'd like

Grenade:Explode()

{entity}:Exists()

Is your feature request related to a problem? Please describe.
The equivalent of {entity}:Destroy

Describe the solution you'd like

{entity}:Exists() : bool -- true if it exists, otherwise false

{entity}:SetVelocity(Vector(...)) and {entity}:SetLocalVelocity(Vector(...))

Is your feature request related to a problem? Please describe.
To set the velocity of entities.

Describe the solution you'd like

{entity}:SetVelocity(Vector(100, 0, 0)) -- to set the velocity to north (global coordinate system)
{entity}:SetLocalVelocity(Vector(100, 0, 0)) -- to set the velocity to the front of the entity (local coordinate system)

vector.X -> The velocity in the X direction
vector.Y -> The velocity in the Y direction
vector.Z -> The velocity in the Z direction

Store / access variables of callbacks outside -> Server crashes

Describe the bug
I cannot store / access variables of callbacks outside. And if you do, the server crashes ๐Ÿคทโ€โ™€๏ธ.

To Reproduce

  1. Take this code at the bottom
  2. Enter some vehicle
  3. Pickup some weapon
  4. Server crashes...

Expected behavior
Server should not crash and outside the callback should still be accessible to the variables.

Code ๐Ÿค“

    local lastVeh = nil
    Character:on("EnterVehicle", function(char, veh)
        lastVeh = veh
    end)

    Weapon:on("PickUp", function(wep, char)
        if lastVeh ~= nil then
            char:EnterVehicle(lastVeh, 1)
        end
    end)

GetMorphTarget, GetScalarParameter and GetVectorParameter

Is your feature request related to a problem? Please describe.
The following setter methods were added, but the getters were forgotten:

  • SetMorphTarget
  • SetScalarParameter
  • GetVectorParameter

Describe the solution you'd like

Character
    GetMorphTarget(number ID): value
    GetScalarParameter(number ID): value
    GetVectorParameter(number ID): value

On connect -> stop server -> client crashes

Describe the bug
If the server is closed while the client is loading / connecting, the client (usually) crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Start Server
  2. Start Client
  3. Connect client to the server
  4. Stop server during the connection.
  5. Client crashes
    Most of the time, when you're in this 'waiting' screen:
    image

Expected behavior
Client should not crash.

Timer not working properly

Describe the bug
return false inside the function not stoping the timer

To Reproduce

function next()
  print("Next was called")
  Timer.SetTimeout(1000, {}, function()
      return false
  end)
end
Character:on("Death", function(character)
    Events:Call("Something", {})
end)
something= function()
  print("Timer: " .. t)
  t = t - 1
  if t == -1 then
    t = 5
    next()
    -- This crashes the server
    -- Timer.ClearTimeout(something)

    -- This don't stop the timer (not entirely)
    return false
  else
    Events:BroadcastRemote("PrintOnClientSide", {t})
  end
end
Events:on("Something", function()
  print("Something was called")
  test = Timer.SetTimeout(1000, {}, something)
end)

Expected behavior
When someone die:
Something was called
Timer: 4
Timer: 3
Timer: 2
Timer: 1
Timer: 0
Next was called

Screenshots
What happens:
image

test

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

SetBodyColor

Describe the bug
Coloring a car's body colors everything (the wheels too)

To Reproduce
Steps to reproduce the behavior:

  1. Create a server
  2. Spawn a "/Game/NanosWorld/Core/Vehicles/BP_Vehicle_SportCar.BP_Vehicle_SportCar_C"
  3. Set color using :SetBodyColor( Color( 0, 0, 255 ) )
  4. See the car fully colored

Expected behavior
Only colored body

Screenshots
image

player:GetCharacter() and char:GetPlayer()

Is your feature request related to a problem? Please describe.
I would like to access the player's character from a player. (Maybe: player:GetCharacter()).

And from the player's character the player (Maybe: char:GetPlayer()).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.