[Script] WDS_Pack (Two Separate Editions!)

WellDoneSnake

Formerly "TSDude"
EDIT: This will be the last major update that this pack receives for now.
I will still put out fixes if bugs are found however.


Heyo, here's a miscellaneous pack that comes with various items and scripts, some of which come from a mod I have been (occasionally) working on.

Now on to the main topic, we got a lotta gifs:


Introducing...
NEO ITEM BALLOON/STARPOST REWARD SYSTEM >>>NEW + MORE INFO<<<
o5U13pz.gif


1) This is a combination of the item balloons and starpost reward system.

2) Touching a starpost now spawns these new item balloons. This version is less restrictive with its gifts.

3) When a balloon is spawned it will move in the direction that the player is facing and at half the speed that the player was going when they activated the starpost.

NOTE: Rocket & Glider should now support multiplayer!

ROCKETS >>>NEW INFO<<<
MapThingNum: 455
2pagCdP.gif


1) Similar to Old Brak Eggman's rideable missiles and other air glider wads/modifications that the srb2 community has made.

2) To use a rocket, simply jump on to the rocketspawner object.
Press the jump button again to disembark.

3) Bumping into a wall, ceiling, letting your character come into contact with an enemy or hazard will knock you off the rocket.

RX7VzYB.gif


4) You can travel underwater and even through goop!

5) Want go faster? Simply press the spin key to boost!

6) You can now spawn a rocket on the spot in the player edition.

GLIDER >>>NEW INFO<<<
MapThingNum: 457
kC3sRrn.gif


1) Glide across long distances with an actual hang glider, it slowly descends while you use it.

2) Pressing up or down can slow down or speed up its descent, which also alters the glider's horizontal speed.
If the glider goes underwater it will stop working.

ITEM BALLOONS
MapThingNum: 456
zQRH7sb.gif


A.K.A HELI-BALLOONS (I do not know why I keep calling them that)

1) Similar to the ones you have seen in Sonic Heroes. Popping them awards you with various items such as: rings, shields, sneakers, invincibility and lives.

2) I have made it so that the angle of these balloons determines what type of award they will give:
- Angle 0 = 5 to 25 Rings [Random]
- Angle_90 = Shields [Random]
- Angle_180 = Sneakers
- Angle_270 = Invincibility
- Angle_315 = Lives

STARPOST REWARD SYSTEM >>>OLD<<<
gFIJplh.gif


1) Touching a starpost will award you with rings, shields and more, quite similar to the Sonic Adventure games.

2) Rewards vary depending on the number of rings you have, a higher amount of rings can give you access to better items.

3) If you already have a shield, you are more likely to be awarded with rings instead. This was done so that shield power-ups do not override each other.
Having a shield does not affect your chances of getting lives, sneakers and invincibility.

STRAFING SEGMENT
en7dwl7.gif


I made a script allows you to force the direction that the player faces and stick to strafing only. The aim of this was make something similar to the sidestepping segments in modern sonic games.

A neat way of using this would be if you wanted to make a Sonic 2 themed special stage and have the player be forced to face a certain angle when moving forward and going through turns.

Making this work is very similar to setting up a normal linedef executor control sector. The sector tagged to the control sector with "Call Lua Function" and "STRAFESEG" in its texture, will have the scripts effects activated once you step inside.

The angle of the "STRAFESEG" linedef, influences the angle of the player.

To cancel the effects make another control sector with "Call Lua Function"
and put "STRAFEOFF" in its texture.

Both control sectors should use Linedef type 301 ("Each Time") to enable their effects.

SPECIAL SPRINGS
MapThingNum: 3001 - Blue Spring Strength
MapThingNum: 3002 - Yellow Spring Strength
MapThingNum: 3003 - Red Spring Strength


veae18f.gif


1) Springs that enable you to use your abilities after being launched by them.

2) The springs will send you to similar vertical heights as blue, yellow and red springs would.

Update 2.1 (mostly fixes)
Rocket & Glider
- Fixed the issue with PF_ROPEHANG affecting the player when they switch from using a rope pulley to a rocket/glider. The items should no longer disappear after using a rope pulley.
- The rocket now supports flipped gravity and the player is positioned accordingly during this change.
- Fixed an issue where getting injured mid-boost would let you stay on the rocket and disable PF_ROPEHANG.
- Rocket's can be spawned on the spot in the player's edition of the wad.

Neo Item Balloons & Starpost Reward System
- Balloons will now (attempt to) move ahead of the player upon spawning. The speed at which they move is determined by how fast the player passes through a checkpoint.
- A warning should no longer appear when the player touches the item balloon as it is spawning.
- The popping sound that plays for the item balloons (new and old) is now determined by their deathsound.

List of old updates:
Update 2.0
Rocket & Glider
- Both items should now support multiplayer.
- The glider's speed and descent can be altered by the player.

Neo Item Balloons & Starpost Reward System
- A new reward system that awards players that pass a starpost with an item balloon.

Update 1.4
Rocket:
- A lot of redundant scripts were removed, thus improving the object's overall performance in-game.
- Z-momentum is now accurately calculated, this means no more seeing the player lag behind the rocket when it moves vertically.
- Horizontal momentum is also calculated properly, meaning that the rocket's A2A8 and A4A6 sprite rotations can now be seen properly when turning.
- The rocket will no longer be active if you hit a spring.

Starpost Reward System:
- Replaced a few soc actions with lua functions

Strafe Segment:
- This script was remade from scratch, the angle that the player is forced to face will now be determined by the linedef's angle (referring to the linedef that calls the function for that sector.
- The player will face any angle that you desire them to face.

Update 1.3
Rocket:
- Hitbox improved
- Rocket/Player momentum has been adjusted
- Got rid of redundant scripts and switched out all of the soc actions for lua functions
- Character ability states should be cancelled when you start riding the rocket.

Heli-Balloon/Item Balloon:
- Got rid of a few soc actions and swapped them out for lua functions.

Strafe Angling Segment:
- Not really an update but I realised that the previous script lags the game a lot. So I have changed it so that the thing's angle determines the player's angle again.

Update 1.2
Everything besides the rocket should work in net-games (the strafe segment works depending on how you use it).

Also credit to Lach for helping me figure out the jumping issue with the rocket.

Rocket Update
- The controls and script for the rocket object have been refined, you no longer have to hold onto the jump button to stay on the rocket. You can simply press jump once more to get off.
- The camera no longer lags behind to the sides when making sharp turns.
- You will now have an increased vertical momentum when boosting while moving up or down.

Starpost Reward System Update
- The starpost reward system has been improved, the rarity of randomly obtaining certain items has changed.
- You are now able to get the sneakers and invincibility power-ups.
- You can also obtain lives.

Strafing Segment Update
- The strafing segment script has a couple changes.
- A total of 16 angles is now supported, thus making turns less sharp.
- You can now influence the angle you face mid-game by changing the light level of the MT_SAT control sector.
- The test map has been improved to demonstrate how 5 angles are used.

Update 1.1
- Test map is now more spacious.
- Player can use the rocket by jumping onto it and holding onto the jump button. Letting go of the jump button will make you let go of the rocket.

DOWNLOAD NOTE: I have split pack into two editions: one for the players and one for the editors.

The player edition gives you the new starpost system and rockets that you can spawn by pressing the custom action 2 button.
So now you can play with these features in the singleplayer/co-op levels!

The editor edition consists of all the old and new items and systems made for the pack along with a testmap.


Most screenshots and GIFs are a little outdated yet remain solid examples of how the items and other features work.

Hopefully this misc pack can prove useful to you all, enjoy!

Credits:
- Spriter's Resources for the sounds
- FuriousFox and his BonusStage.wad on MB, I used a section of his script as a template
- Jimita and Rapidgame7 for helping me with the HUD and timer scripts for the starpost reward system
- Lach for helping me figure out how to make the player disembark by jumping.
- Kalaron and his SRB2CB mod, I used his hang glider sprites from that project.
- Thanks to all those on Discord who put up with my questions about scripting
 

Attachments

  • WDS_Glider.gif
    WDS_Glider.gif
    5.4 MB · Views: 379
  • WDS_OldStrafe.gif
    WDS_OldStrafe.gif
    6.5 MB · Views: 419
  • WDS_RocketUnderwater.png
    WDS_RocketUnderwater.png
    58.1 KB · Views: 297
  • WDS_Pack(ForPlayers).zip
    44.6 KB · Views: 208
  • WDS_Pack(ForEditors).zip
    201.2 KB · Views: 179
Last edited:

D00D64

Probably Responsible
Moderator
Kart Krew™️
Judge
Welcome to releases! However, I will say the rocket feels a bit finicky, as it seems every time I jump on it, its a coinflip as to if it'll actually work, or... just poof away and leave my arms hanging. Still, the other items here seem to function properly, so I'll let it in for now and you can see what you can do later, I guess.
 

WellDoneSnake

Formerly "TSDude"
Thanks, and I understand what you mean about the rocket. The script is supposed to check if you've pressed the jump button while using the rocket. Unfortunately it also checks as soon as you've just touched the rocket. Hence why it disappears, there is a way around it but I haven't worked it out yet.

One method that I did get to work, was making it so that the you can use the rocket as long as you're holding down the jump button.

I might just edit that in until I can find a better solution, at least you can get some consistency that way.

Edit: I've updated it
 
Last edited:

Lach

he/him
Moderator
Sonic Team Junior
Kart Krew™️
Judge
I'm assuming your issue is related to BT_JUMP being active as long as jump is held. You can get around this in a few ways:
1) Use a JumpSpecial hook where code is only run when (player.pflags & PF_JUMPDOWN == 0). The rest of the code in that hook's function will only run when jump is first pressed.

2) Set a custom player variable to true when BT_JUMP is held, and set it to false when BT_JUMP is released. Move this code near the bottom of your function. At any point before it, code run when (player.cmd.buttons & BT_JUMP ~= 0) and your custom variable is false will only run when jump is first pressed.

3) Set a custom player variable to 0. Whenever BT_JUMP is held, add 1 to the value. When BT_JUMP is released, set it back to 0. Move this code near the top of your function. At any point after it, code run when the custom variable is equal to 1 will only run when jump is first pressed.
 

WellDoneSnake

Formerly "TSDude"
I'm assuming your issue is related to BT_JUMP being active as long as jump is held. You can get around this in a few ways:
1) Use a JumpSpecial hook where code is only run when (player.pflags & PF_JUMPDOWN == 0). The rest of the code in that hook's function will only run when jump is first pressed.

2) Set a custom player variable to true when BT_JUMP is held, and set it to false when BT_JUMP is released. Move this code near the bottom of your function. At any point before it, code run when (player.cmd.buttons & BT_JUMP ~= 0) and your custom variable is false will only run when jump is first pressed.

3) Set a custom player variable to 0. Whenever BT_JUMP is held, add 1 to the value. When BT_JUMP is released, set it back to 0. Move this code near the top of your function. At any point after it, code run when the custom variable is equal to 1 will only run when jump is first pressed.
In response to your post:
You were completely right with that assumption, prior to submission I did follow methods similar to steps 2) and 3) however I had no luck. I realised after looking at your post that I was putting the code I made in the local function for the MobjThinker hook, so every tic it would keep acknowledging that the jump button was pressed.

I slightly followed your first step and that seems to have solved the issue. Many thanks!

[The Wad Has Been Updated]
Changes were made to the rocket, starpost reward system and strafing segment.
Improvements are explained in the original post.


Hopefully in the future I can figure out how to make the rocket usable in net-games (so far I worked out a buggy method...).

Edit: I've updated a couple of the explanations in the first post
 
Last edited:

WellDoneSnake

Formerly "TSDude"
Once Again The Misc Pack Has Been UPDATED!~

Changes are stated above in the original post, these include:

- A waaay less buggy rocket than before, I had finally properly understood what I should be doing when checking the rocket/player's angle and momentum.

- Introducing le hang glider!

- The strafing segment script was completely changed, its linedef function is now a lot easier to use than before, since the linedef now determines the angle that the player is forced to face.
 

WellDoneSnake

Formerly "TSDude"
Yet Another Update?!

Changes are once again stated in the original post, these include:

- Rockets and Gliders that should now support multiplayer.

- A new starpost reward system that I think suits SRB2 a little more than the old one (the old one is still there btw).

The pack has been separated into two, download the player edition if you want to enjoy a couple of the new features in-game or online otherwise you should download the editor edition if you want to take these features in order to learn or use them elsewhere.
 

WellDoneSnake

Formerly "TSDude"
Quick Fix (+Extra)

I noticed a few issues as well as things missing from pack, the fix/update includes:

- In the player edition you can now spawn a rocket anywhere, just jump and hit the custom action 2 button. Go ahead and cheese through the levels...

- A fix for an old issue where mounting a rocket/glider after using a rope pulley would make them disappear.

- Rocket's get flipped gravity support:

jW4mYGO.gif


- Neo Item Balloon (NIB) behaviour changes

- Also fixed an issue occurred when touching the NIB before it decides what award to give you.

- Sounds for the item balloons (old and new) are no longer read and played by their number.

More info can be read in the above post under "Update 2.1".
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top