Colored Balloons

Status
Not open for further replies.

Arf

Member
Hi, I need some help with SOCing all around because I suck at these.
So far, by modyfing Draykon's SOCs, I made it so that balloons change colours using A_Changecolourabsolute, thing is:

FRAME 1354
SPRITENUMBER = 192
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1355
ACTION A_ChangeColorAbsolute
VAR2 = 5

This will change the balloon colour for orange, but if I wanted every colour for the balloons, would I have to make SEVERAL, different "things", with VAR2 values for each? Or is it possible to set VAR2 to something random each time a balloon is made?
 
Would I have to use A_DualAction to have both A_ChangeColorRelative and A_RadnomState?
 
Create 15 (Or less if you don't want ALL of the colors, some of them are kinda icky) copies of the state with A_ChangeColorAbsolute, then use A_RandomState with Var1 set to the first of the 15, and Var2 set to the last. No DualAction needed.
 
Something's wrong:

FRAME 1370
SPRITENUMBER = 192
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_RandomState
VAR1 = 1371
VAR2 = 1381

#that part is the spawnstate for the balloon thing, it's suposed to choose randomly between the states 1371 and 1381, right?

#---------------here start colours----------------

FRAME 1371
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_ChangeColorAbsolute
VAR2 = 1

FRAME 1372
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_ChangeColorAbsolute
VAR2 = 2

...
Edited some states out to shorten the post
...

FRAME 1379
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_ChangeColorAbsolute
VAR2 = 9

FRAME 1380
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_ChangeColorAbsolute
VAR2 = 10

FRAME 1381
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION A_ChangeColorAbsolute
VAR2 = 11

#---------Here end colours---------------


FRAME 1354
SPRITENUMBER = 192
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1355
ACTION none

FRAME 1355
SPRITENUMBER = 193
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1356
ACTION none

FRAME 1356
SPRITENUMBER = 194
SPRITESUBNUMBER = 0
DURATION = 10
NEXT = 1354
ACTION none

#that's the main balloon loop

FRAME 1357
SPRITENUMBER = 192
SPRITESUBNUMBER = 1
DURATION = 10
NEXT = 1358
ACTION A_PlayActiveSound

FRAME 1358
SPRITENUMBER = 193
SPRITESUBNUMBER = 1
DURATION = 10
NEXT = 0
ACTION A_BubbleSpawn

#Popped balloon

Thing 246
MAPTHINGNUM = 9999
SPAWNSTATE = 1370
SPAWNHEALTH = 1000
SEESTATE = 1357
SEESOUND = 0
REACTIONTIME = 8
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 0
PAINSOUND = 22
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 0
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 720896
RADIUS = 1310720
HEIGHT = 1048576
MASS = 100
DAMAGE = 0
ACTIVESOUND = 22
RAISESTATE = 0
FLAGS = 131586

#and this here is the balloon thing, the spawnstate is the state that has A_RandomState, which should choose a random colouring state, which should go into the main balloon loop

Problem is, the balloons are still green, and don't change the colour at all. If needed be, I'll post the entire thing.
 
Actions can't be run on the spawn state unless you add a flag which isn't supported by the SOC Editor. Basically, you can run actions on the spawn state, but it's so inconvenient, that I wouldn't.
 
oooh, I thought the balloon had the flag, guess I oughta pay more attention. Thanks a bunch, I'll test it now
 
sorry for double posting, but else this wouldn't appear as an updated topic.
Neways, I added the flag and things worked nice, except that it only chooses THE TWO values stated in var1 and var2
Say, it chooses randomly the two states, 1 and 11, instead of choosing all the states between them.
 
wiki has no info on them, neither does the SOC editor. Are you sure they exist?
There's also A_RandomStateRange, but it made stuff work even LESS
 
Nevermind:

srb20017gb1.png


I got it to work by using A_RandomState's faulty way of functioning, by making it choose between two states, which each had their own A_RandomState to choose between two states each. And those 4 states had A_RandomState too... blablabla.
I got it to work. Lock this topic if needed.
 
Status
Not open for further replies.

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

Back
Top