Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
General Coding Discussion
12-13-2007, 05:28 PM,
Re: Coding
Righto, working on the code a little more before I distribute it.  Will try get it done before xmas.

The arrow keys are too clumsy for aiming I've decided.  Because of that I'm working on a mouse system.  Although, i'm planning to make it differ from a standard FPS in that the mouse only controls aiming, not looking.  If it works, it should mimic what is seen on the Vetron view at the start of No Remorse.
12-13-2007, 05:34 PM,
Re: Coding
Nice, like turret rotation. In order to rotate the body, use arrows. Aim Mouse where the cooursor runs all over the screen, nice idea!
"Time is a great teacher, but unfortunately it kills all its pupils." - Hector Berlioz
12-13-2007, 09:37 PM,
Re: Coding
It worries me that if we're going to use WASD for moving about, it will strike players as odd if A and D are not for strafing but turning.
12-13-2007, 10:11 PM,
Re: Coding
I think its a good diversion between crusader and mech feeling.
You don't play the mech all the time and without strafing it makes it a little challange to use the powerful vehicle.  So it hasn't only advantages and isn't too simple.
12-14-2007, 03:43 AM,
Re: Coding
(12-13-2007, 09:37 PM)Jupix link Wrote: It worries me that if we're going to use WASD for moving about, it will strike players as odd if A and D are not for strafing but turning.

I wouldn't worry about that too much.
"First let me say welcome to the Resistance, Captain."
12-14-2007, 04:47 AM,
Re: Coding
I also do not think that it should be a trouble. Controls like that are very popular in MechWarrior games and they are perfect actualy. Man, I wish there was another MechWarrior developed by the same guys who made MW2 and MW2:Mercenaries. Those were two best games ever!
"Time is a great teacher, but unfortunately it kills all its pupils." - Hector Berlioz
12-16-2007, 05:03 PM,
Re: Coding
I suppose we'll have to wait till there's a playtest binary.
12-21-2007, 10:08 AM, (This post was last modified: 12-21-2007, 10:16 AM by Heoga.)
Re: Coding
Playtest time!

The files in this zip are the code needed for:

Mech Control
Fusion, Fission and Chemical Batteries

Use the FGD code to add the Mech to hammer.
Add a point_camera entity named Mech_Cam to the map.
Copy the binaries (or compile using the codes)
In game, fire the ControlActivate input to start controlling the mech.

Currently there is one bug which requires work.  If the mech wanders out of the player's PVS then the view will change to an abstract view somewhere on the map.  In order to solve this I'm going to have to delve into the PVS scripts, but that's a job for after the holidays.

At least with this you can get a feel for the mech workings and give some feedback on the system.
12-21-2007, 10:52 PM,
Re: Coding
First off, thanks for the release... Looking at the code now I realise what an enormous task you've done here, so you truly deserve everyone's gratitude. Great job.

I just diff'd and merged your codechanges but something's not clicking. When I pull my ControlActivate trigger in game, I get

> Attempted to create unknown entity type npc_thermatron!
> Can't init npc_thermatron

in the console. Any idea why the game doesn't recognize the npc type? It's probably something obvious but I'm not seeing it. Where are all the npc types defined?
12-24-2007, 12:54 PM,
Re: Coding
Hey Jupix,

I'm away from my computer for the next two weeks, so support is limited for now.

I came across that error myself before and discovered it was due to a typo in the FGD file.  The name type of entity in the FGD must match the name in the LINK_ENTITY_TO_CLASS line of the npc_thermatron.cpp file.

LINK_ENTITY_TO_CLASS( npc_thermatron, CNPC_Thermatron );
@NPCClass base(BaseNPC) studio("models/breen.mdl") = npc_thermatron : "Thermatron"

If that's not the problem, then test with the compiled binaries and see if they work.
If they do, then the most likely problem is that the npc_thermatron files haven't been added to the project.

Assuming your using microsoft visual studio
Click on the hl2_dll folder in the server.dll
Go to project->add existing item
add the files which aren't already in the project (thermatron, servomech and battery files)

Repeat the process for the cl_dll/crusader folder on the client.dll for the mech_targeting_hud file.

It should work then.

Let me know how you get on.

Forum Jump:

Users browsing this thread: 1 Guest(s)