Jump to content

Engine won't run FPSplayer Script component.


Go to solution Solved by Josh,

Recommended Posts

Posted (edited)

0.9.9 Steam/ Build 2574

Created new fps project > made map containing one brush and character > attached FPSPlayer component to player model > run in release.

image.png.8021063e84f445e22302012386f36019.png

I get the following error:

image.png.a136af444ed4d61c14db6d83cf473e58.png

I cannot attach the fpsplayer script to camera or brush. Will get the same error.

Can attach and run camera control script without error.

Did update projects in project manager previous day.

Have not made any changes to FPSPlayer or main script.

folders.png.a8406bb5d1fc5457429514c2b892fad9.png

fps2a is a destination folder. fps_test.zip map file is included.

fps_test.zip

Edited by razor
Updated Information
  • Thanks 1
Posted

Hi, can you please upload the file fps2a(?), as well as your map file?

It seems strange that there is no file extension on the file fps2a.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Thanks, I can easily reproduce this error. Give me a few minutes...

My job is to make tools you love, with the features you want, and performance you can't live without.

  • Solution
Posted

Okay, this was just some simple scripting errors in FPSPlayer.lua:

At line 63 replace this:

self.sound_hit[n] = LoadSound("Sound/Impact/bodypunch" .. tostring(n) .. ".wav")

With this:

        if FileType("Sound/Impact/bodypunch" .. tostring(n) .. ".wav") == 1 then
    		self.sound_hit[n] = LoadSound("Sound/Impact/bodypunch" .. tostring(n) .. ".wav")
        end

Around line 222 replace this:

if type(properties[key]) == "string" then

With this:

if type(properties[key]) == "string" and properties[key] ~= "" then

Modified file is attached.

FPSPlayer.lua

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...