67aba1a673aad

Page: [1] 2 »
67aba1a67582a
2 Guests are here.
 

Topic: ShakeYourBooty Read 599 times  

67aba1a67628bRocketMan

67aba1a6762ef
Trying to do this "shake the screen" effect, which I've heard in the past has something to do with a script called ShakeYourBooty?  Of course I can't find documentation for it.  Then after 30 seconds of trying, ZylonBane descended from above in a booming voice and told me to do it how Irrational did it.  Luckily this time I knew where in the game that actually happened... because it happens in the first 30 seconds when the array blows up.

So I'm looking at 50 frickin red cubes in dromed, trying to figure out which one of em shakes the screen.  After a while of that fun, I concluded it must be a TweqTrap which is receiving a signal from somewhere, which has an EmitTweq on it and that emits a HE Explosion.  So I check HE Explosion in the hierarchy and it has a ShakeStim on it.  Ok.

So the first thing I do is copy-paste what Irrational did.  I make a TweqTrap, put the Emit Tweq on it with all the same parameters, and I send it a switchlink signal from a nearby tripwire.  All that did was produce a fireball directly in front of me when I crossed the tripwire but no shaking of the screen... I dunno, maybe some other ingredient is missing?  I've got the brush in a room and recompiled the level... can't really think what else I didn't do.

To be honest I'd rather not use an HE explosion if I don't have to.  That sounds like the wrong way to do it since I don't want a fireball or any noise, just the shaking.  I figure there must be a way to just enable the shakeyourbooty script?

67aba1a67640bvoodoo47

67aba1a67645d
I would check medsci1 marker 2002 and.. just do that. all it needs is a TurnOn signal.

67aba1a676507RocketMan

67aba1a676551
2002?  I'm checking the vanilla unstripped medsci1 and I don't see a 2002.  At least Edit>Find doesn't return one.

67aba1a676680ZylonBane

67aba1a6766cd
Vanilla SS2 doesn't shake the player when the dish impacts, surprisingly. It does shake the player when they launch into the Many. To find where a script is used in a mission, go to Object Hierarchy -> Export -> Export All. Search the generated file for the script name.

67aba1a676814RocketMan

67aba1a676860
I must have loaded up an SCP build then because the ground shook when the array hit.  In any case I found the button that launches you into the many and it has the script on it.  However when I reproduce that in a test level it doesn't work.  I mean I didn't include everything like the outbound switchlinks or the schema or objlook but I'm assuming you don't need any of that.  I'm assuming that pressing the button itself invokes its own scripts, which are basebutton, shakeyourbooty and it's set not to inherit so that's what I did.  Nothing.  I was going to say I want this to work on a tripwire rather than a button but I guess one thing at a time since I can't reproduce the behaviour yet.  I do have all my OSMs loaded btw and the test is in a room brush.  I put a level start marker in too.  Nothing.

Also when I jump into Rick3, the button ALSO doesn't shake anything.  Could this be because I'm doing everything in editor mode?

67aba1a676934ZylonBane

67aba1a67697f
Huh, I just noticed rick3 has a nonfunctional ShakeYourBooty script on button 111. The actual shaking is done by the script on marker 603.

Anyway, the script function that shakes the player (actually just makes the player "lean" in various random directions) doesn't work unless the player has fallen or walked a certain distance first. Probably something to do with fully initializing the player's movement model.

67aba1a676b8fRocketMan

67aba1a676be5
Huh, I just noticed rick3 has a nonfunctional ShakeYourBooty script on button 111. The actual shaking is done by the script on marker 603.

You mean I found a thing?   yayyyyy....

I thought one of the trailers for the shock project showed a couple guys in a room that starts to shake... maybe my memory is faulty though, it often is.  I just thought I'd seen it done before without any particular movement going on prior.

67aba1a676da7voodoo47

67aba1a676dfc
2002?  I'm checking the vanilla unstripped medsci1 and I don't see a 2002
yeah, this is SCP, it's always SCP by default.

67aba1a676ecaRocketMan

67aba1a676f17
So... you got it to work in SCP but if I recall, the player can just choose not to move after they're dumped in the level. I know their's always an initial fall of a few inches but is that's all that's needed to get the shaking to work?

67aba1a676fedZylonBane

67aba1a67703d
There isn't always an initial fall if the player spawn markers are positioned correctly. But yes, falling a a couple feet does seem to initialize things so the shake works. See for example the start of rick2.

SCP works by also shoving the player forward so they don't have to fall as far.

67aba1a6770ffRocketMan

67aba1a67712e
Sorry, something's messed up here.  I see it works in medsci1 and in rick2 but it doesn't work when I do the exact same thing... I drop the player and let him run around a bit, then he crosses a tripwire which fires a signal to a marker with the script on it and nothing happens, every time. 

67aba1a6771c4ZylonBane

67aba1a677214
Did you give it an intensity?

Have you verified the marker is actually receiving the signal?

67aba1a67756aRocketMan

67aba1a6775b7
By intensity you mean Shake Strength?  Rick2 didn't do that but I did anyway. I gave it 10.  NVSpy says BeginScript on Marker 149 from 0, Sim on Marker 149 from 0, ObjRoomTransit on Marker 149 from 0, TurnOn on Marker 149 from 118 ----> that's the one ----> EndScript on Marker 149 from 0 and Sim on Marker 149 from 0.

67aba1a6776beZylonBane

67aba1a67770b
Select the Scripts entry on the marker, click the copy button, then paste it here.

Also try adding ShakeYourBooty to any door in the base game then walking through the door.

67aba1a6777c0RocketMan

67aba1a67780d
{ ShakeYourBooty; NvSpy; ; ; TRUE}

Putting the script on a door didn't do anything.  Does it have to be in my level or did you mean the vanilla game?

67aba1a677985sarge945

67aba1a6779e4
just a really dumb question/observation.

Don't you need to actually load NVScript.osm as part of your map (or via DML) for it to actually work?

67aba1a677bd9ZylonBane

67aba1a677c41
Hold up...

Do you not have a PlayerFactory marker in your level?

67aba1a677daaRocketMan

67aba1a677df7
I did... must have removed it.  [shaking works now].  Good news is it doesn't seem to require a lot of height when dropping the player into the level, to trigger this effect, which is good.

Let me guess.  The playerfactory code initializes a bunch of stuff on the player object, including stuff like shake stim or scripts that would do the same?

When you have a multi-level game you only put the start marker in the first level right?  Because the set-up on the player persists between levels?  So then how do you properly design your subsequent levels without putting the marker on them and then having to go back through later and delete them all so you can play the game in its entirety properly?

I guess this pretty much ties in with a larger gap in my knowledge where I keep having to replay the whole game to check a change I made 3 levels later because I don't know how to make the editor think I'm just resuming a previous save game.  Whenever I warp in, everything's broken unless I play through the whole game from the beginning.
« Last Edit: 05. February 2025, 23:50:26 by RocketMan »

67aba1a677ef0ZylonBane

67aba1a677f4d
Shaking the player is actually done by PlayerScript. ShakeYourBooty just sends a message to the player telling it to shake. But unless there's a PlayerFactory link to tell the engine which archetype to use to spawn the player, the in-game player won't have PlayerScript, or any of the other properties set on The Player.

You've apparently been testing with a bare-bones "default" player with none of the necessary scripts and properties for any of the game systems to work correctly other than just walking around and clicking things.

67aba1a67803bRocketMan

67aba1a67808c
Then I would say it's a miracle that I've gotten anything to work at all.  But I thought since the finished game only needs it once on the first level, you're not supposed to put it in every level.  Needless to say I'll be putting it all my levels from now on before debugging anything else.
« Last Edit: 06. February 2025, 04:04:54 by RocketMan »

67aba1a678145sarge945

67aba1a678193
Welcome to yet another reason why singletons and the factory pattern are awful programming techniques.

Your name:
This box must be left blank:

Name the default melee weapon in System Shock:
2 Guests are here.
You See the Battlefield
Page: [1] 2 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67aba1a678a1a