SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing

Thread Tools Search this Thread
Old 12-26-2019   #1
Default Chain Spawnpoint / Parameters

I was about to implement some swinging chains to my level and realized they don't work the same way they did in 2.1, how does the new Linedef Type 9 work?
Also known as "RTB" on Discord
RomioTheBadass is offline   Reply With Quote
Old 12-26-2019   #2
toaster's Avatar

* Mace point mapthings have been slightly modified.
   - MTF_AMBUSH: bigger luke theory (has no effect on custom mace, different effect on spring mace)
   - MTF_OBJECTFLIP: flips the objects, but nothing else - just so it doesn't look out of place in gravflip sections
   - MTF_OBJECTSPECIAL: keeps it from attempting to play swinging sounds
   - angle: tag of controlling linedef
   - parameter: number of "spokes" minus one - for example, a parameter of 2 results in 3 equidistant maces rotating around the same point.
* Mace linedefs have been significantly revamped.
   - line dx: number of chain links
   - line dy: speed (in FU)
   - frontside floor height: Pitch (in degrees; how much it "tilts" over - Yaw influences the axis it's tilting on)
   - frontside ceiling height: Yaw (in degrees; rotation of entire thing on xy plane)
   - frontside x offset: Phase (in degrees; how far it is through the rotation cycle)
   - frontside y offset: "Minimum chainlink distance" setting - if less than zero, the absolute of that many chainlinks will not be spawned from the center outwards, for if you want stuff to not be in a wall. Doesn't affect the head of the chain at all, since otherwise what's the point? :V
   - backside floor height: Pinch (in degrees; 0 if no backside; essentially makes rotation conical instead of wheel-like)
   - backside ceiling height: Roll (in degrees; 0 if no backside; rotates on the axis of the spinning - identical to Phase for spinning maces, but useful for rotating swinging maces as opposed to just offsetting them)
   - backside x offset: Number of "antispokes" (0 if no backside; makes that many spokes not exist so you can put another mace/chain type in there instead; for combo mace/chain instead turns them into chains directly)
   - backside y offset: Width (in number of extra chains per side; 0 if no backside; creates a "skiprope" arrangement)

   - ML_NOCLIMB: for chains and chain-mace combos, allow for player control of yaw through strafe keys
   - ML_EFFECT1: replacing the seperate mapthings, this makes a mace type swing instead of spin.
   - ML_EFFECT2: for all spokes of the mace wheel ending in maces, make the chains out of the mace type (inverted for firebars)
   - ML_EFFECT3: spawn a bonus mace type at the center(s) of rotation
   - ML_EFFECT4: don't clip inside ground
   - ML_EFFECT5: always think/visible (maces without this have a pop-in distance effect)
* Mapthing 1104 represents both spinning and swinging maces from prior versions of SRB2.
* Mapthing 1105 has gone from being a swinging mace variant to a combination of chains and maces in a single unit, provided the number of "spokes" is greater than one.
* Mapthing 1105 has gone from being a swinging chain variant to a vertical spring-on-a-ball-on-a-chain. Yellow by default, apply MTF_AMBUSH to turn into a red spring.
* Mapthing 1107 represents both spinning and swinging chains from prior versions of SRB2.
* Mapthing 1108 (hidden sling) is completely untouched except to port over 2.1's functionality to the new backend.
* Mapthing 1109 is a Mario castle-level style firebar. This inverts the functionality of ML_EFFECT2 on the tagged linedef.
* Mapthing 1110 is a free slot should we want to implement another type of base-game mace.
* Mapthing 1111 is a custom mace. Use the linedef's frontside texture slots to identify a macetype mobjtype, then use the backside texture slots to identify a linktype mobjtype (defaults to MT_NULL if no backside).

I provided this info to help get the wiki updated, but it turns out it hasn't happened yet. Hope this helps! ^u^
toaster is offline   Reply With Quote
Old 12-26-2019   #3

Thank you :) just what I needed.
Also known as "RTB" on Discord
RomioTheBadass is offline   Reply With Quote
Old 09-17-2020   #4
Default help

from where i can see the x and y distance????????????
sanek is offline   Reply With Quote
Old 09-17-2020   #5
NAR the Fox
Self-taught Lua Amateur
NAR the Fox's Avatar

Originally Posted by sanek View Post
from where i can see the x and y distance????????????
While this thread is old, I'll answer it for the sake of being helpful.

The X and Y distance can be measured by calculating relative vertex positions. For example, if you have one vertex of a line at (768, 2048) and another at (784, 2080), the X distance would be 16, and the Y distance would be 32. How do I know this? Simply put, you'll have to find the difference between the two points, which would be ((v2x - v1x), (v2y - v1y)), with v1 being Vertex 1, and v2 being Vertex 2. Plugging in the numbers, 784-768 would be 16, and 2080-2048 would be 32. In the context of chain parameters, this would equal 16 chain links, and 32 fracunits/tic of speed.
You can just call me "NARbluebear"
My YouTube Channel

Last edited by NAR the Fox; 09-17-2020 at 08:31 PM. Reason: Gave a formula instead of a direct example
NAR the Fox is offline   Reply With Quote
Old 09-18-2020   #6

uh okaaaay, but i already got, it sorry if i haven't mentioned it

i just tried to make control sector lesser and smaller and boom!
the chain wasn't that hyper fast or super long, i realized then that i can adjust control sector on the x axis, and change the amount of chains,
same thing for speed, just adjusting control sector on the y axis, and the speed will change

Last edited by sanek; 09-18-2020 at 10:22 AM.
sanek is offline   Reply With Quote
Old 09-21-2020   #7
Emblem Radar Ready
glaber's Avatar

Actually nar, it's easier than that to get the x and y distances. just use the linedef length of the line between vertices 1 and 2. the up and down line would be for Y and the left and right line for X.
Welcome to my Dimension
glaber is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:45 AM.

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