![]() |
![]() |
#1 |
Too fast for you to see me.
|
Ok,first off, I'm beginner with soccing, so, try to don't laugh when you see what I did XP.And second, yes, I read the morph's soccing tutorial, but it only gave some basics, like creating a simple enemy.
So, Let's start. I've messed around a bit, and I saw that, to make a char ability, I have to make a thing that will be the thokitem later.Then, I saw that some character ability socs have a state with A_FindTarget action as it spawnstate,so, I put this there too. And now, I'm trying to make the player hide in the ground(like the minus enemy) and after a while, pop-up from the ground.And then I've messed up with all, and it becomes into this: Spoiler: AND WELL DONE!!! I tested it in a character and it does..... nothing. (¬_¬") What should I do to make this thing work? |
![]() |
![]() |
![]() |
#2 |
Probably Responsible
Moderator
|
I havent tried this SOC myself yet, but does the S_SKIN have "ghostthokitem = 0" in it anywhere?
|
![]() |
![]() |
![]() |
#3 |
Too fast for you to see me.
|
yes, and thokitem = 400, the SOC was in the MAINCFG too.I think I just did something(or all) wrong in the SOC.
EDIT: I changed the SEESTATE to the frame 1995, and now, everytime that I try to perform the ability(thoking), the game crashes. Last edited by PHCC; 12-08-2010 at 10:48 AM. |
![]() |
![]() |
![]() |
#4 | |
|
Well there are two crucial mistakes you made:
1). Quote:
You could create a new 1 tic lasting spawnstate that does absolutely nothing and is followed by your current spawnstate, too. I guess this is something that should be mentioned in the current object creation tutorial... 2.) You want the player to dig BUT what you are actually doing is you command the socitem object to perform the digging. If the player should perform the digging the player object itself has to be calling a state that contains these actions. This is, however, not possible because the state call of a player object is hardcoded for obvious reasons. You could use srb2Morphed.exe to make use of A_SetObjectState and force the player object into a state with the specific action. This unfortunatelly won't work either because sending players into long (lasting a few seconds) state cycles is prevented by the hardcoded state calls that will break any cycle. The ability you want to create can be implemented with source code modification and if I recall correctly something similar has already been done. I think there was a modification in the 1.08 era that made Knuckles go into digging mode if you pressed spinning while gliding.
__________________
Try soccing, it's fun! :> Check out the wiki: http://wiki.srb2.org/wiki/Object_Creation_Tutorial or read the original one: http://mb.srb2.org/showthread.php?t=30906 |
|
![]() |
![]() |
![]() |
#5 |
Too fast for you to see me.
|
So.... The ability that I wanted to perform is actually impossible to do. But I think it was a good start(even if it doesn't actually works). =)
|
![]() |
![]() |
![]() |
#6 |
Permanently Banned
|
Morph, what would happen if the SOC'd object used A_RemoteAction to force the player to call A_MinusDigging constantly, regardless of state? If a second timer object was spawned to use A_RandomStateRange on the previously mentioned object, you wouldn't even have to make a hundred states for it.
I haven't worked with the minus actions, so I wouldn't know the result of this; but, it seems like it would be worth a shot. |
![]() |
![]() |
![]() |
#7 |
Too fast for you to see me.
|
Well, messed up a bit more,and I made the player hides in the ground as I wanted(Thx to Prime 2.0 and Morph). But the problem now is that, when I call the function to the player object, it makes all the players hides in the ground. And one more problem, I can't stop the action, so, when I press the jump button, I go out from the ground, but after a while, I automatically hide in the ground again.
Here is the SOC: Spoiler: EDIT:One question: If I had to use A_RemoteAction to call the player object to dig, wouldn't I need to use A_RemoteAction to make the player pop-up from the ground(and then stop the action)? EDIT2:Well, I removed some states, and it turned into this: Spoiler: Now, for an odd reason, it isn't affecting the others players, but it's affecting the crawlas(they can't detect you if you're underground, but can't detect the others players too).And it isn't working correctly, sometimes that I thok, it just doesn't work correct.And I don't know how to change the sprites when digging. I'll post a link with a wad that I usually don't use, that is using the SOC. http://www.4shared.com/file/zr_hoBgT/Lari2.html Well, the SOC is almost done!! =) EDIT3: Another problem, how do I make the player doesn't jump or spin while underground?? |
![]() |
![]() |
![]() |
#8 |
Too fast for you to see me.
|
Sorry for double posting but I didn't find a way to make the player not spin and jump while performing the dig. But I think there is a way to move for a certain direction, in a straight line, to the direction that you're aiming. Maybe A_MoveAbsolute or A_MoveRelative should do something like this.Or there are other ways to do this?
EDIT: Here's my last SOC for this ability: Spoiler: I'm stopping because: *Sometimes that the ability is used, they do this in another player, not me. *I can't pop monitors once I use this ability. *Players can jump on the player, and happens something strange.... *When the player dies, he becomes a rabbit(like an enemy). What If everything were right? I would add A_CustomPower and set VAR1 = 27 and VAR2 = the time that is used to dig and pop up and the SOC would be done. Last edited by PHCC; 12-09-2010 at 10:37 PM. |
![]() |
![]() |
![]() |
#9 |
Permanently Banned
|
If you want to make sure that it only happens to the player that used it, try making the custom object use Target for A_RemoteAction instead of looking for the nearest player; it'll already be set to the player that spawned it since it's the spin item. As for the rest of the stuff you've described, I'm interested in taking a look at it; could you send me a copy of the wad so I can mess with it?
Last edited by Prime 2.0; 12-21-2010 at 02:47 AM. |
![]() |
![]() |
![]() |
#10 |
Plush Princess
|
As Prime said, Var1 for your A_RemoteAction states should be -1. That should make it so that it targets the specific player using it, rather than just 'the nearest player'
In general, what you'll find is that the player will handle most actions in unusual ways. I'm not sure everything that A_PopUp does, but there's a good chance that it's not enough to return the player to 'normal.' It might help to reset the player's flags after using A_Popup. To do that, add another A_RemoteAction call, this time calling A_SetObjectFlags, to return the player's flags to their defaults. (I don't remember on hand, but I think it's '6'?) That'll have the side effect of making the player flash green, but it MIGHT fix the other problems. That's what I'd try anyway. |
![]() |
![]() |
![]() |
#11 |
Too fast for you to see me.
|
Ok, but there's another problem, that is: When the player is "digging", he can jump and spin as well, and obviously, I don't want this to happen.As for the other problems, I'll mess up more with the SOC to see what I can do.
And Prime 2.0, the link for the testwad is here: http://www.4shared.com/file/Piw3k10l/Lari2_2.html Also, I tried to add the digging sprite in this testwad, and make it appear when the player is performing the action, but it didn't work. =( |
![]() |
![]() |
![]() |
#12 |
Too fast for you to see me.
|
Now, the ability is working almost perfectly:
Spoiler: But there are two problems: *The first time that you try to do the ability, it doesn't work (Fixed); *I noticed that the player have to do a complete jump to the ability work properly, if you press jump and then press jump again quickly, the ability won't work. Draykon, can I ask you a question? How did you make Rosy's ability works only when she's almost touching the ground? Ah, and a new link for the testwad: http://www.4shared.com/file/E_p7C6sG/Lari2.html EDIT: I made some adjustments in the SOC: Spoiler: EDIT2: I don't know what I did here, but yeah, there's only one problem lasting: Spoiler: The problem that is lasting is the second one. Last edited by PHCC; 12-29-2010 at 04:20 PM. |
![]() |
![]() |
![]() |
#13 |
Permanently Banned
|
So after working with it for a bit, I found that the issue with the ability not working was because the thok item had MF_Special on; that turns it into a collectible, which meant that it was being "collected" most of the time instead of actually doing anything useful.
...while I was figuring that out, I did a bit of housekeeping in the SOC since it was an unreadable mess previously. Besides organizing and commenting it, I removed the useless A_FindTarget(You can't call targeting actions in the first tic no matter what, and it was set up to find a blue crawla for some reason), took out the "spawn actions" flag, adjusted the timing so I could test different stuff with it more rapidly, removed the delay between A_MinusPopup and A_SetObjectFlags so that being killed the first tic out wouldn't spawn a bunny, and tossed in an A_RandomState for show. Code:
# MT_LariDig - Thok item for Lari Shadehunt. # Makes Lari dig in the ground Thing 400 MAPTHINGNUM = -1 SPAWNSTATE = 2101 SPAWNHEALTH = 100 SEESTATE = 0 SEESOUND = 0 REACTIONTIME = 32 ATTACKSOUND = 0 PAINSTATE = 0 PAINSOUND = 0 MELEESTATE = 0 MISSILESTATE = 0 DEATHSTATE = 0 DEATHSOUND = 0 XDEATHSTATE = 0 ACTIVESOUND = 0 RAISESTATE = 0 FLAGS = 8 # [Flags: NoSector] # Ref1 - Initiates digging FRAME 1992 ACTION A_MinusDigging # Ref2 - Ends digging and pops actor out of the ground FRAME 1993 ACTION A_MinusPopup # Ref3 - Sets flags MF_Solid and MF_Shootable FRAME 1994 ACTION A_SetObjectFlags VAR1 = 6 VAR2 = 0 # Ref4 - Temporarily removes movement control from the player FRAME 1995 ACTION A_CustomPower VAR1 = 27 VAR2 = 47 # Ref5 - Thrusts forward FRAME 1996 ACTION A_Thrust VAR1 = 64 VAR2 = 0 # Ref6 - Changes state to S_PLAY_PLG1 FRAME 1997 ACTION A_RandomState VAR1 = 16 VAR2 = 16 # LariDig_1 - [Spawn] This is a thok item, so it doesn't need A_FindTarget FRAME 2101 SPRITENUMBER = 193 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2102 ACTION None # LariDig_2 - Tells Lari to start digging FRAME 2102 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2103 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1992 # [RemoteAction: Ref1(MinusDigging)->Target] # LariDig_3 - Sets Lari's flags to prevent glitchy deaths FRAME 2103 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2104 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1994 # [RemoteAction: Ref3(SetObjectFlags)->Target] # LariDig_4 - Makes it so Lari can turn, but not move FRAME 2104 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2105 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1995 # [RemoteAction: Ref4(CustomPower)->Target] # LariDig_5 FRAME 2105 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 20 NEXT = 2106 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1992 # [RemoteAction: Ref1(MinusDigging)->Target] # LariDig_6 - Thrusts Lari forward FRAME 2106 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 20 NEXT = 2107 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1996 # [RemoteAction: Ref5(Thrust)->Target] # LariDig_7 - Makes Lari pop out of the ground FRAME 2107 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 0 NEXT = 2108 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1993 # [RemoteAction: Ref2(MinusPopup)->Target] # LariDig_8 - Sets Lari's flags to prevent glitchy deaths(again) FRAME 2108 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2109 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1994 # [RemoteAction: Ref3(A_SetObjectFlags)->Target] # LariDig_9 - Makes Lari go into spring animation FRAME 2109 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 0 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1997 # [RemoteAction: Ref6(A_RandomState)->Target] # {Next: S_NULL} ...anywho, when you've figured out where you want all the states to be, you can use this to move them easily, though you'll have to update the info table and RemoteAction references manually. Last edited by Prime 2.0; 12-30-2010 at 04:44 AM. |
![]() |
![]() |
![]() |
#14 | |
Drifting Golden Swordsman
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 | |
Too fast for you to see me.
|
Quote:
Now, I'm going to test it. EDIT: I'll travel today, tomorrow I'll be here with the last SOC for this ability. EDIT2:Well, I don't know why it isn't working. See the SOC, isn't it right? Code:
# MT_CharDig - Thok item for the character. # Makes the character dig in the ground Thing 400 MAPTHINGNUM = -1 SPAWNSTATE = 2100 SPAWNHEALTH = 100 SEESTATE = 0 SEESOUND = 0 REACTIONTIME = 32 ATTACKSOUND = 0 PAINSTATE = 0 PAINSOUND = 0 MELEESTATE = 0 MISSILESTATE = 0 DEATHSTATE = 0 DEATHSOUND = 0 XDEATHSTATE = 0 ACTIVESOUND = 0 RAISESTATE = 0 FLAGS = 8 # [Flags: NoSector] # Ref1 - Makes the character's flashing time becomes to 0 tics to prevent glitches FRAME 1991 ACTION A_CustomPower VAR1 = 2 VAR2 = 0 # Ref2 - Initiates digging FRAME 1992 ACTION A_MinusDigging # Ref3 - Ends digging and pops actor out of the ground FRAME 1993 ACTION A_MinusPopup # Ref4 - Sets flags MF_Solid and MF_Shootable FRAME 1994 ACTION A_SetObjectFlags VAR1 = 6 VAR2 = 0 # Ref5 - Temporarily removes movement control from the player FRAME 1995 ACTION A_CustomPower VAR1 = 27 VAR2 = 47 # Ref6 - Thrusts forward FRAME 1996 ACTION A_Thrust VAR1 = 64 VAR2 = 0 # Ref7 - Changes state to S_PLAY_PLG1 FRAME 1997 ACTION A_RandomState VAR1 = 16 VAR2 = 16 # CharDig_1 - Spawn FRAME 2100 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2101 ACTION None # CharDig_2 - Sets the character's flashing time to 0 tics to prevent glitches FRAME 2101 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2102 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1991 # [RemoteAction: Ref1(CustomPower)->Target] # CharDig_2 - Tells the character to start digging FRAME 2102 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2103 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1992 # [RemoteAction: Ref2(MinusDigging)->Target] # CharDig_3 - Sets the character's flags to prevent glitchy deaths FRAME 2103 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2104 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1994 # [RemoteAction: Ref4(SetObjectFlags)->Target] # CharDig_4 - Makes it so the character can turn, but not move FRAME 2104 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2105 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1995 # [RemoteAction: Ref5(CustomPower)->Target] # CharDig_5 FRAME 2105 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 20 NEXT = 2106 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1992 # [RemoteAction: Ref2(MinusDigging)->Target] # CharDig_6 - Thrusts the character forward FRAME 2106 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 20 NEXT = 2107 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1996 # [RemoteAction: Ref6(Thrust)->Target] # CharDig_7 - Makes the character pop out of the ground FRAME 2107 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 0 NEXT = 2108 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1993 # [RemoteAction: Ref3(MinusPopup)->Target] # CharDig_8 - Sets the character's flags to prevent glitchy deaths(again) FRAME 2108 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 2109 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1994 # [RemoteAction: Ref4(A_SetObjectFlags)->Target] # CharDig_9 - Makes the character go into spring animation FRAME 2109 SPRITENUMBER = 0 SPRITESUBNUMBER = 0 DURATION = 1 NEXT = 0 ACTION A_RemoteAction VAR1 = -1 VAR2 = 1997 # [RemoteAction: Ref7(A_RandomState)->Target] # {Next: S_NULL} Last edited by PHCC; 12-31-2010 at 11:23 AM. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ShadowN's ability | TornadoTW | Help | 0 | 12-18-2008 10:07 PM |
Ability.soc | onyx | Outdated Releases (0.X & 1.X) | 17 | 01-08-2008 12:45 AM |
Soccing | Kaiser the Dragon | Editing | 2 | 12-19-2006 09:33 PM |
Soccing | The Yellow Blue Dude | Help | 11 | 12-04-2006 09:34 PM |