67b9f09fdd4fd

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

Topic: ShakeYourBooty Read 1255 times  

67b9f09fe0424RocketMan

67b9f09fe04aa
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?

67b9f09fe05cevoodoo47

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

67b9f09fe06e4RocketMan

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

67b9f09fe0856ZylonBane

67b9f09fe08bb
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.

67b9f09fe0a00RocketMan

67b9f09fe0a53
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?

67b9f09fe0b4dZylonBane

67b9f09fe0b9d
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.

67b9f09fe0dcfRocketMan

67b9f09fe0e29
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.

67b9f09fe0fdavoodoo47

67b9f09fe1034
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.

67b9f09fe110bRocketMan

67b9f09fe115c
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?

67b9f09fe1237ZylonBane

67b9f09fe128b
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.

67b9f09fe1351RocketMan

67b9f09fe13b5
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. 

67b9f09fe144eZylonBane

67b9f09fe149b
Did you give it an intensity?

Have you verified the marker is actually receiving the signal?

67b9f09fe17baRocketMan

67b9f09fe1809
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.
[Capture.PNG expired]

67b9f09fe190eZylonBane

67b9f09fe195b
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.

67b9f09fe19fcRocketMan

67b9f09fe1a4f
{ 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?

67b9f09fe1bc5sarge945

67b9f09fe1c18
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?

67b9f09fe1d76ZylonBane

67b9f09fe1dc0
Hold up...

Do you not have a PlayerFactory marker in your level?

67b9f09fe1f1bRocketMan

67b9f09fe1f70
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 »

67b9f09fe205cZylonBane

67b9f09fe20b1
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.

67b9f09fe2183RocketMan

67b9f09fe21d1
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 »

67b9f09fe2263sarge945

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

Your name:
This box must be left blank:

A familiar passcode with 3 digits:
7 Guests are here.
I'm a cop. I don't have a backstory.
Page: [1] 2 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67b9f09fe54ab