Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content count

  • Joined

  • Last visited

About D2Jk

  • Rank
    Green Marine
  1. You sure are a knowledgeable fellow. :-) As for the problem, time to put the thinking cap on... EDIT: Just a bit of tweaking required still, but this seems to work: Missile: IMPX A 10 A_FaceTarget IMPX B 6 A_ImpMsAttack TNT1 A 0 A_ChangeFlag("SKULLFLY", 0) IMPX CBAB 6 A_JumpIf(velx == 0, "See") Goto Missile+3 Without the velocity check, the imp would not return to See state, even when stationary after hitting something. EDIT 2: This is fun too: Missile: IMPX A 5 A_FaceTarget IMPX B 5 A_SkullAttack(12) TNT1 A 0 A_ChangeFlag("SKULLFLY", 0) IMPX CBAB 5 A_JumpIfCloser(100, "StopCharge") TNT1 A 0 A_JumpIf(velx == 0, "See") Goto Missile+3 StopCharge: IMPX DDDD 1 A_ScaleVelocity(.85) TNT1 A 0 A_ChangeVelocity(velx,vely,0, CVF_REPLACE) Goto Melee They slightly slow down when close to their target, while at the same time preparing for the melee attack ("IMPX D" is the first sprite of the melee animation). If the target dodges, they fly past while still melee'ing. The A_SkullAttack here causes them to charge 100% of the time, unlike A_ImpMsAttack's 25% chance. Things get rather hectic in highest skill level, as they're constantly entering the Missile state as long as they can see their target.
  2. I have the flares working almost 100% as planned. Recently I even made them check if there are multiple active on the actor, and if so, the sticky flare will use a different color. But there's one lasting problem still. If the red gargoyle is hit by the flare while it is charging at the player, he won't enter the Pain.Flare state at all, for some reason. In this case the visual flare won't appear, since it's spawned in the Pain.Flare state. This problem applies to all difficulty levels. Do you happen to know if the A_ImpMsAttack / A_SkullAttack functions are known to cause problems like this, by any chance?
  3. That did it! Such a simple fix too, thank you very much. :-)
  4. Hello, I'll explain this a bit first. I made a custom flaregun for Heretic, which uses PoisonDamage, and a visual flare sprite that sticks to the monsters for the duration. In lack of a better way to implement this, I give the flare projectile a custom damagetype "Flare", and make the monsters always go to the Pain state when hit by this damagetype, in which they spawn the sticky flare sprite. Each monster uses their own customised sticky flare actor to ensure that the flare sprite sticks to the correct height (chest). Since the chest height is different for most monsters (heretic imp vs undead knight, for example), a little tweaking is necessary here. Here's a sample code for one of the monsters:PainChance "Flare", 256 ... Pain.Flare: TNT1 A 0 A_SpawnItemEx("StickyFlareMummy", 0,0,0 , 0,0,0 ,0, SXF_SETMASTER) Goto See The sticky flare actor for this monster: ACTOR StickyFlareMummy { ReactionTime 180 MONSTER +NOGRAVITY +NOCLIP States { Spawn: FLAR A 0 A_ReArrangePointers(AAPTR_MASTER) FLAR A 0 A_CountDown FLAR A 1 A_Warp(AAPTR_TARGET, 8,0,36, 0, WARPF_NOCHECKPOSITION | WARPF_INTERPOLATE) Loop } } Now, all this works well enough for skill levels 1-4 in Heretic, but for some strange reason not on skill 5 (black plague possesses thee); the sticky flare sprites just won't appear. I guess I would need to know what mechanics (?) exactly does the highest skill level change, that might disrupt the code above. Anyone? -- And as always, if someone has a smarter way to do these sticky flares, I'm all ears. If there was a lot of different monster types, it would get laborous to do it this way, as you have to customize the flare position for each monster type (though not for color variations and such, where the size/height doesn't change). Also, it would be great to have the flare to stick to where it actually hit the monster, not just to some predefined position like I'm doing here. But I realize that might not be easily accomplished. :-)
  5. D2Jk

    Custom water splash for small objects?

    Wow, you da man. It didn't even cross my mind to check something like that. Thanks a lot. :-) The water bouncing behavior of this actor will remain a mystery for me I guess, but for now it doesn't matter.
  6. D2Jk

    Custom water splash for small objects?

    It still bounces on water. Testing with "waterlevel >= 0" at least makes the jump (the shell looks like a splash of water), but that's of no use.
  7. D2Jk

    Custom water splash for small objects?

    Thanks for the reply. It's true that lowered mass property causes a lighter water splash graphics to appear, however, doing that won't change the splash sound effect. Actually, when you suggested lowering the mass, I was expecting it to maybe play at slightly lower volume. Anyway, the lighter splash graphics is ok, but I really would like to be able to use a custom sound effect. I just need help with the code above. Unfortunately I've already tried with single ">" as well, and that didn't do it. But thanks for the advice.
  8. Hello, If an ejected shell hits the water in Heretic, it will use the default splash sound, which is too loud. I'm trying to make it use a custom water splash sound effect instead, but could use some help here. Let me know if there's a smarter way to do this, but here's the code I've been trying with so far:ACTOR BulletCasing1 { Projectile BounceType "Doom" BounceFactor 0.55 BounceSound "ShellSound" +DONTSPLASH +EXPLODEONWATER +FLOORCLIP -NOGRAVITY States { Spawn: SHEL ABCDEFGH 2 Loop Death: TNT1 A 0 A_JumpIf(waterlevel >> 0, "SmallSplash") SHEL A -1 Stop SmallSplash: TNT1 A 0 A_PlaySound("smallsplash") SPSH ABCDD 8 Stop } } In the Death state, the shell should detect when it's lying on water, and jump to create a splash effect. Also, if I've understood correctly, the +EXPLODEONWATER flag should go to the Death state immediately, but it does not (the shell bounces on water as well).
  9. Well, ACS_NamedExecute has worked well in my previous scripts. But in fact, I'm currently just using "TNT1 A 0 Thing_SetTranslation(0, 98)" (a script creates the translation). Apparently this works too.
  10. I don't know why you posted that link, as I already knew what functions I'm going to need. Anyway, I also happened to find the problem. This was wrong: "CreateTranslation (98, 0:255=%[0,0,0]:[1,0,0])" It has to be: "CreateTranslation (98, 0:255=%[0.0,0.0,0.0]:[1.0,0.0,0.0])" (though slightly more compact 0:255=%[0,0,0]:[1.0,0,0] seems to work as well) What a headache over a simple matter...
  11. Still trying to get this work. I could simply create new sprites with the desired color in image editing program, but I'd like to learn to do this in a smarter way. Are there any WADs that might already have a script like this, that I could take look at? I don't mean recoloring monsters or players upon entering a map, but instead during the play.
  12. I see. So it would be more advisable to simply create a script for each colorization, assigning each translation a unique ID (95,96,97...)? EDIT: It's not working yet:Script "ColorizeRed" (void) { CreateTranslation (98, 0:255=%[0,0,0]:[1,0,0]); Thing_SetTranslation(0, 98); Delay(1); } This is how I call it in decorate:TNT1 A 0 ACS_NamedExecute("ColorizeRed") What did I miss?
  13. Bumping this thread for a follow-up question. I'd like to change an actor's color dynamically within one of its actor states. Unfortunately the list of action functions doesn't seem to offer anything to accomplish this, so I'm guessing I'll have to create a custom ACS script for this instead, passing the R,G,B values as arguments in ACS_NamedExecute. I came up with the following script:Script "Colorize" (int R, int B, int G) { CreateTranslation (99, 0:255=%[0,0,0]:[R,G,B]); Thing_SetTranslation(5, 99); Delay(1); } The Thing ID (5) is just something I made up for now. What should I replace it with, considering that I may be calling this script from a number of different actors, all of which I'm assuming have their own IDs? Can it be done this way?
  14. Now trying with this script:Script "PrintArgument" (int Test) { print (d:Test); Delay(1); } And for testing, I'm using this code in a Ready-state of a weapon: Ready: CHGG A 1 A_WeaponReady TNT1 A 0 A_SetArg(2, args[2]+1) TNT1 A 0 ACS_NamedExecute("PrintArgument", 0, args[2]) Loop The printed message on the screen doesn't seem to update; it prints "0" once, and doesn't come back after it's faded out, despite being continously called in the looped ready-state. Why is this? EDIT 1: Nevermind, suddenly it began working (?). Thanks for the help. :-) EDIT 2: Is it possible to control player's FoV with ACS?