Gah - a solution with more questions. – EntropicLqd
Legacy:WarmFuzzy
Intro[edit]
Hi there. WarmFuzzy here. I started playing with UnrealScript earlier this year using the excellent LibHTTP in a proof-of-concept ultra-simple-prototype sort of thingie. The proof of concept worked, and I've been working on a mod that I intend to tie in with a tick-based strategy game, currently accessible through the web.
About the Mod[edit]
I ended up biting off a pretty big chunk for my first real project, but I'm coping nicely. I wanted to take the Onslaught gameplay and add to it a bit. One of the core concepts to my modifications is the Mobile Headquarters, or MHQ (aka Leviathan aka Mobile Assault Station). I have made the following changes so far:
- Generators start unlinked to any node
- When an MHQ deploys near a node, that node becomes capturable
- The main cannon of the MHQ now spawns a vehicle that the player selects, and then puts him inside it
- The plasma turrets are now autoturrets
- new players spawn in the MHQ they choose
In order to accomplish stuff like the above, I had to replicate a function from client to server, replicate a few variables from server to client, and seriously play with the RestartPlayer code, but it is pretty solid. I have a couple of current problems that perhaps someone could help with :)
Problems[edit]
- I would like the MHQs to not fire a shot unless they are deployed. I set all the plasma turret pawns to be !bActive, but the autoturret controllers seem to squeeze off a few shots when another actor first gets close. Other than that, this seems to work.
- Pursuant to the above, I'd like MHQs to deploy automatically if they are not moved for $some_time. At first, I thought this would be a simple task. "All I need to do is set a timer that watches elapsed time without a Location change, and does a GotoState('Deploying') when we've waited long enough." Boy, I couldn't have been more wrong. I could see the MHQs logging that they were deployed, but nothing seemed to happen on the client side.
I read a little more about replication and simulation, paying particular attention to the stuff about simulated states. "Ahah! The GotoState() isn't being called on the client because it's happening in a non-simulated function in a non-simulated state! I'll fix that!"
To no avail. Then I thought "Maybe the state code in 'Deploying' needs to be simulated too." I even tried making the 'Deployed' state simulated, then the 'Deployed' state functions, etc etc.
Now that I've had some time to think this through, I'm going to start from my baseline, working MHQ (that doesn't automatically deploy) and work through the above again, accurately noting what breaks, when, and how.
Current Project[edit]
Beware the crappy images/design/etc, we are but two coder-designers with nary a stitch of art sk33lz between us. _But_ there is a mildly playable and fairly decently documented strategy/political game there, if you're interested in that sort of thing.
Guestbook[edit]
Tarquin: Hi. Welcome :)