SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Miscellaneous

Reply
 
Thread Tools
TCD_Misc Pack Details »»
TCD_Misc Pack
Version: 1, by TSDude (Lack of tea) TSDude is offline
Developer Last Online: Apr 2019

Category: Version: SRB2 Rating:
Released: 04-16-2019 Last Update: Never Installs: 1
SOCs Scripts Re-Useable Content Sprites/Graphics

This is miscellaneous pack that comes with items and scripts that I have been working on from an old mod.

I felt like sharing them since I may never complete the mod at the rate I am going at.

New Update
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.
Spoiler:
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.


Old Update
Spoiler: Update
- 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.


Item List:
- Rocket = [Thing No. 455]
- Heli-Balloons = [Thing No. 456]
- Special Springs [Thing No. 3001-3003]

Script list:
- Strafing Segment [With Thing No. 457]
- Starpost Reward System

Spoiler: Explanation
[Objects]

ROCKET

1) The rocket essentially controls quite similarly to the Old Brak Eggman missiles that you could ride as well as older air glider wads/modifications that the srb2 community has made.

To use the rocket, simply jump on to it. Press the jump button again to disembark

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

3) You are not limited to where you can traverse, especially when you can go underwater.

4) Press the spin key while using the rocket to boost.

HELI-BALLOONS

1) These balloons are similar to the item balloons you have seen in previous sonic games (like Sonic Heroes).

2) Touching these balloons awards you with rings, shields, sneakers, invincibility and lives.

3) In order to save space on the freeslots, I have made it so that the angle of the balloon item determines what type of award it will give.
Angle List:
- Angle 0 = 5 to 25 Rings [Random]
- Angle_90 = Shields [Random]
- Angle_180 = Sneakers
- Angle_270 = Invincibility
- Angle_315 = Lives

SPECIAL SPRINGS

1) These are springs that let you use your abilities after being launched by them.

2) Each spring sends you to the same vertical heights as the vertical blue, yellow and red springs.

[Scripts]

STRAFING SEGMENT

1) This lua script allows you to make areas similar to the sidestepping segments in modern sonic games. The only difference is that you will be strafing instead (I thought that it would allow the player more freedom that way).

2) I will leave details of the setup after explaining the starpost reward system.

STARPOST REWARD SYSTEM

1) This script makes it so that you are awarded with different items upon activating a starpost.

2) The rewards are mostly random and they 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.


Spoiler: Strafing Segment Explanation

Designing this is quite simple, if you follow these steps you should be able to get this script working in your map.

1) Create an "Invisible, Intangible" FOF (linedef type 223) control sector, tag the FOF's linedef to the desired target sector. And give the FOF's control sector a new tag and the sector special "Anywhere in Sector".

2) Create a new control sector, give one the linedefs the "Call Lua Function" type (linedef type 443), in the upper textures type "STRAFESEG", there is no need to give this linedef a tag.

In the same control sector, make one of the other linedefs a "Continuous" type (linedef type 300), and tag it to the "Intangible, Invisible" FOF's control sector that you had created earlier.

3) Create another control sector similar to the previous one, except this time for the "Call Lua Function" linedef, type in the upper textures "STRAFEOFF". And for another linedef in the same control sector make its linedef type 301 (aka "Each Time"), make sure to check the bouncy wall flag for this linedef too (hence the linedef action is called after you have left a sector/intangibile fof).

Spoiler: Quick Note
The "STRAFESEG" script and continuous calling, is for ensuring that the player keeps on facing an intended direction.
The "STRAFEOFF" script and linedef are for toggling the player's strafing flags.


4) Lastly, you need to place your "Strafe Angle Thing" (MT_SAT = Thing type 457) on your map. This thing should be placed in the "STRAFESEG" control sector.

Currently there are only 16 directions that the player can forced to face, more may be introduced in future updates.

List of supported angles and the light levels that determine the angle you use:
- 0 = EAST // Uses Light Level 1
- ANGLE_22h // Uses Light Level 2
- ANGLE_45 = NORTHEAST // Uses Light Level 3
- ANGLE_67h // Uses Light Level 4
- ANGLE_90 = NORTH // Uses Light Level 5
- ANGLE_122h // Uses Light Level 6
- ANGLE_135 = NORTHWEST // Uses Light Level 7
- ANGLE_157h // Uses Light Level 8
- ANGLE_180 = WEST // Uses Light Level 9
- ANGLE_202h // Uses Light Level 10
- ANGLE_225 = SOUTHWEST // Uses Light Level 11
- ANGLE_247h // Uses Light Level 12
- ANGLE_270 = SOUTH // Uses Light Level 13
- ANGLE_292h // Uses Light Level 14
- ANGLE_315 = SOUTHEAST // Uses Light Level 15
- ANGLE_337h
// Uses Light Level 16

The player will be unable to turn left and right during these segments, they will only be able to strafe, pressing the turn keys while going through this segment will make you strafe left or right.

If you want to change the direction that the player should face during a play-through, simply use linedef type 402 ("Set Tagged Sector's Light Level"). Use this action to change the light level of MT_SAT's control sector.

The example in one of the gifs below is quite outdated, but it still shows how the segment works in my mod (with the aid of camera scanner).


There is also a test map that has all of the items and scripts used in it, you can explore it in order to further understand these features.

I hope that 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
- Monster psychic cat and Rapidgame7 for helping me with the HUD and timer scripts for the starpost reward system

Download Now

File Type: zip TCD_Misc.zip (310.1 KB, 9 views)

Screenshots

Click image for larger version

Name:	srb2_HB.gif
Views:	63
Size:	6.95 MB
ID:	18603   Click image for larger version

Name:	srb2_Rocket.gif
Views:	59
Size:	7.29 MB
ID:	18604   Click image for larger version

Name:	srb2_SPRINGS.gif
Views:	45
Size:	4.67 MB
ID:	18605   Click image for larger version

Name:	srb2_Starposts.gif
Views:	45
Size:	6.56 MB
ID:	18606   Click image for larger version

Name:	srb2_STRF.gif
Views:	75
Size:	6.49 MB
ID:	18607  

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 2 Days Ago   #2
D00D64
Worst Ranked 'Kart Player
Moderator
 
D00D64's Avatar
Default

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.
__________________
The least skilled player on the Kart Krew dev team. I try my best. It's just not good enough.

My awful Twitter account

My also awful YouTube channel
D00D64 is offline   Reply With Quote
Old 2 Days Ago   #3
TSDude
Lack of tea
 
TSDude's Avatar
Default

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
__________________
*snip*

Last edited by TSDude; 2 Days Ago at 09:34 AM.
TSDude is offline   Reply With Quote
Old 1 Day Ago   #4
Lach
nanananananananananananan a
 
Lach's Avatar
Default

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:
Spoiler:
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.
Lach is offline   Reply With Quote
Old 1 Day Ago   #5
TSDude
Lack of tea
 
TSDude's Avatar
Default

Quote:
Originally Posted by Lach View Post
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:
Spoiler:
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:
Spoiler:
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
__________________
*snip*

Last edited by TSDude; 18 Hours Ago at 08:35 AM.
TSDude is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.