Help Needed To: Mod Example 4 FPS - & - Create New Maps
Quote:
Originally Posted by
jay1025
1) When trying to tweak the initial values in Machinegun.js (such as my script values of “var damage=10.0; var bulletsPerClip=50; var clips=20”), such values get lost and are overridden in runtime when inspecting “PlayerPrefab(Clone).CrateCamera.Weapon”. First of all, I can’t find where “PlayerPrefab(Clone).CrateCamera” adopts “Weapon” as a child. :( Also, where do the new overriding values come from (such as “damage=20.0; bulletsPerClip=30; clips=5”)?
Quote:
Originally Posted by
appels
Inspector values have precedence over the ones in the script. So you need to edit the ones you want in the inspector also or make the values private in the script.
Thanks Appels for the advice about using 'private' in scripts to hide from the inspector.
Also, I'm hoping if somebody could help me find -- in the original FPS -- 'where “PlayerPrefab(Clone).CrateCamera” adopts “Weapon” as a child.' Once someone can point me in that direction, I hope to understand how the original project overrides -- at runtime -- Machinegun.js vars such as: 'damage', 'bulletsPerClip', and 'clips'. Personally, I've looked and looked...even traced with MonoDevelop debugger, yet to no avail. :( Thanks again for any assistance out there. Still Searching... :) jay1025
Scoreboard not behaving correctly with more than 2 players?
Could someone else test and confirm this behaviour?
I've been seeing some odd behaviour with the scoreboard in my game, so I went back and built Example4 (the shooter with the crates) straight from a fresh install. I then set up a lan game with three computers : one computer as the server (player 1), and the other two as clients (Player 2 and Player 3).
Upon running the game, I find that the scoreboard only updates for interactions between an individual player and the server. Actions between clients that don't involve the server never get updated.
Examples:
server (player 1) kills player 2.
The server's scoreboard shows this:
server: 1 kill 0 deaths
player 2: 0 kills 1 death
player 3: 0 kills 0 deaths
So far, so good. Player 2's scoreboard reads this:
server: 1 kill 0 deaths
player 2: 0 kills 1 death
player 3: 0 kills 0 deaths
Still good. However, player 3's scoreboard reads this:
server: 1 kill 0 deaths
player 2: 0 kills 0 deaths
player 3: 0 kills 0 deaths
Player 2 will receive the server's update that the server scored a kill because it's coming from the server and it will record it's own death. Player 3 WILL NOT receive the record that player 2 has died because player 2 is not the server.
All computers now quit and relaunch the game with the same configuration. This time Player 2 kills Player 3. The scoreboards now look like this:
Server Scoreboard:
server: 0 kill 0 deaths
player 2: 1 kill 0 deaths
player 3: 0 kills 1 death
again, so far, so good.
Player 2's scoreboard:
server: 0 kills 0 deaths
player 2: 1 kill 0 deaths
player 3: 0 kills 0 deaths
Player 2 records it's own kill because it's the one sending the message. However, Player 2 DOES NOT record Player 3's death because it doesn't receive any messages directly from Player 3 and the server doesn't appear to pass it on.
Player 3's scoreboard:
server: 0 kills 0 deaths
player 2: 0 kills 0 deaths
player 3: 0 kills 1 death
Same situation as before: Player 3 will record it's own death because it is the one sending the message, but it never receives the message from Player 2 that Player 2 scored a kill.
I hope you could follow along with that because it can easily get confusing. At first I thought maybe it was something I did when I adapted this to my game, but since I'm testing this from a direct fresh install of the download, I'm guessing it's an actual bug in the scripting. Would it be possible for someone to do an independent test to confirm this?
@Leepo: Your last reply was over 2 months ago. Have you forgotten about your customers?