SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Editing Help (https://mb.srb2.org/forumdisplay.php?f=64)
-   -   Needing SOCs Samples (https://mb.srb2.org/showthread.php?t=43018)

Smith The Icefox 10-13-2017 03:21 PM

Needing SOCs Samples
 
I'M NOT ASKING FOR TEAMS FOR MY MOD, I'M ASKING WHERE I CAN FOUND SOC SAMPLES!!!
Is there some sample of projectile SOC script?
Where can i find it? I'm working in SOCs for MEGACRAWLA and i need to see some SOC structure of projectile (i've already searched in SRB2 Wiki)
OFF-TOPIC QUESTION:
How can i fix lava damage not working properly? (delay)

Monster Iestyn 10-13-2017 06:24 PM

Do you mean projectile? I think the articles for some enemies and bosses have Object info tables for any projectiles they use at least. If you know how you define Object types using SOC then they should pretty easy to make a SOC script out of referring to them.

You did also check the "projectile" page right?


Regarding lava damage, what about it exactly is not working? "delay" doesn't really clear up what you mean.

Smith The Icefox 10-13-2017 06:41 PM

Quote:

Originally Posted by Monster Iestyn (Post 796429)
Do you mean projectile? I think the articles for some enemies and bosses have Object info tables for any projectiles they use at least. If you know how you define Object types using SOC then they should pretty easy to make a SOC script out of referring to them.

You did also check the "projectile" page right?


Regarding lava damage, what about it exactly is not working? "delay" doesn't really clear up what you mean.

I know how to define object types, but just enemies or objects not projectiles (also, thanks for correcting my grammar)
I've already read this page but, it doesn't give me an idea how to use projectile types, so i did a huge mistake ;-;

Code:

State S_CYBRAKDEMONMISSILE
SpriteName = RCKT
SpriteFrame = A
Duration = 70
Next = S_POSS_RUN2
Action = A_SplitShot
Var1 = 0
Var2 = 3

Object MT_CYBRAKDEMON_MISSILE
SpawnState = S_CYBRAKDEMONMISSILE
SeeState = S_CYBRAKDEMONMISSILE
SeeSound = sfx_BRAKRL
ReactionTime = 70
MeleeState = S_NULL
MissileState = S_NULL
DeathState =S_CYBRAKDEMONMISSILE_EXPLODE1
XDeathState = S_NULL
DeathSound = sfx_BRAKRX
Speed = 3
Radius = 24*FRACUNIT
Height = 32*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = |MF_SUPERFIRE|MF2_EXPLOSION|MF2_RAILRING
RaiseState = S_NULL

I know, everything here is wrong but, there's no page to show an example so, that's not my fault.
About the lava... it's having delay with damage
Nevermind! I just forgot to put "Damage(fire)" effect in it but, i also noticed that i have already did it, but for some reason i had to do it again (maybe i just didn't saved the map :p)
Anyway, thank you!

Monster Iestyn 10-13-2017 08:17 PM

The projectile page isn't clear on how to use projectiles because there are many ways to use them. For instance it lists many actions that do exactly that, such as the A_SplitShot one you've chosen to use there. =P

That said I'm not sure if you're using A_SplitShot correctly there...

From A_SplitShot's wiki article (https://wiki.srb2.org/wiki/A_SplitShot):
Quote:

Var1 determines the horizontal offset from the target's position to aim for; the offset is added to one missile and subtracted from the other. Var2's lower 16 bits determine the Object type of the missile that is shot. Var2's upper 16 bits determine the height offset the missiles are shot from.
if you're confused about the lower/upper 16 bits thing for Var2, it just means you need to set Var2 to "MT_OBJECTTYPE+(height<<16)", MT_OBJECTTYPE being the type of Object you want the actor to fire and height being the height offset (relative to the z position of the actor's bottom).

Smith The Icefox 10-13-2017 08:58 PM

Quote:

Originally Posted by Monster Iestyn (Post 796440)
The projectile page isn't clear on how to use projectiles because there are many ways to use them. For instance it lists many actions that do exactly that, such as the A_SplitShot one you've chosen to use there. =P

That said I'm not sure if you're using A_SplitShot correctly there...

From A_SplitShot's wiki article (https://wiki.srb2.org/wiki/A_SplitShot):


if you're confused about the lower/upper 16 bits thing for Var2, it just means you need to set Var2 to "MT_OBJECTTYPE+(height<<16)", MT_OBJECTTYPE being the type of Object you want the actor to fire and height being the height offset (relative to the z position of the actor's bottom).

Okay, i'll be trying now.

---------- Post added at 05:58 PM ---------- Previous post was at 05:20 PM ----------

EDIT: I'm really bad at scripting... i'm done!


All times are GMT. The time now is 02:48 PM.

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