67b9ed9b75994

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

Topic: ShakeYourBooty Read 1245 times  

67b9ed9b78895RocketMan

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

67b9ed9b78a1avoodoo47

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

67b9ed9b78b17RocketMan

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

67b9ed9b78c92ZylonBane

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

67b9ed9b78e1dRocketMan

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

67b9ed9b78f37ZylonBane

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

67b9ed9b791b7RocketMan

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

67b9ed9b793a9voodoo47

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

67b9ed9b794bdRocketMan

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

67b9ed9b795d8ZylonBane

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

67b9ed9b796deRocketMan

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

67b9ed9b797b9ZylonBane

67b9ed9b79803
Did you give it an intensity?

Have you verified the marker is actually receiving the signal?

67b9ed9b79b4bRocketMan

67b9ed9b79be0
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]

67b9ed9b79c8aZylonBane

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

67b9ed9b79d79RocketMan

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

67b9ed9b79f46sarge945

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

67b9ed9b7a101ZylonBane

67b9ed9b7a14f
Hold up...

Do you not have a PlayerFactory marker in your level?

67b9ed9b7a2a7RocketMan

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

67b9ed9b7a3f2ZylonBane

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

67b9ed9b7a534RocketMan

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

67b9ed9b7a626sarge945

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

Your name:
This box must be left blank:

How can you challenge a ____, immortal machine? (Fill in the missing word):
3 Guests are here.
Think of a perfect summer night. The contrast between the warm summer breeze and pulsating cold stars.
Page: [1] 2 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67b9ed9b7b5ac