deepthought Posted June 24, 2010 I'm trying to create a starwars mod, and i want the zombiemen, who i've turned to stormtroopers to fire blaster bolts. in the DECORATE lump of my wadfile i've entered actor stormtrooper:Zombieman replaces Zombieman { states { Missile: POSS D 0 A_SpawnItemEx("blasterbolt",0,0,8,0,20,0,0,0) stop } } all they do when they should fire is turn into my blasterbolt actor and go flying. Quite hilarious, really! How should i make my enemy fire blaster bolts? Thanks in advance!! 0 Share this post Link to post
Vader Posted June 24, 2010 Replace the "stop" at the end of the missile state with a "goto See" and it should propably work! However, your missile state looks a little odd anyway (only one frame is called and that with a duration of 0 tics), I'd suggest to examine other peoples DECORATE or take a look at the wiki. 0 Share this post Link to post
Gez Posted June 24, 2010 deepthought said:actor stormtrooper:Zombieman replaces Zombieman { states { Missile: POSS D 0 A_SpawnItemEx("blasterbolt",0,0,8,0,20,0,0,0) stop } } all they do when they should fire is turn into my blasterbolt actor and go flying. Quite hilarious, really! See that "stop" keyword here? It means that the actor stops existing. They don't turn into blasterbolts, they shoot blasterbolts and disappear. 0 Share this post Link to post
deepthought Posted June 24, 2010 OK i replaced stop with Goto see. they don't disappear, but they are like real storm troopers, which is to say, wildly inaccurate. i need them to shoot at me, not sideways. 0 Share this post Link to post
Gez Posted June 24, 2010 You really should look at the many many many examples of standard actors on the ZDoom wiki. You'll see how they're made. For example, I don't see a call to A_FaceTarget, so they will not even aim at their target before firing... 0 Share this post Link to post
deepthought Posted June 24, 2010 You're right reading does help! i replaces A_SpawnItemEx with A_missile attack, and used A_FACE TARGET. they are accurate now. Now, how can i achieve a shotgun effect for the zombie seargeant? for my shotgun i used SHTG AAAAAAA 0 A_FireCustomMissile("blasterbolt",0,false,random(-10,10),8,0) How can i do that for a monster? A_FireCustomMissile doesn't work with monsters. if you try it gives you an invalid state parameter error. Thanks in advance!! 0 Share this post Link to post
deepthought Posted June 24, 2010 Never mind. I found that A_Custom Missile is the equivalent. 0 Share this post Link to post
Gez Posted June 24, 2010 Yeah, A_CustomMissile, A_CustomMeleeAttack, A_CustomComboAttack, A_CustomRailgun and A_CustomBulletAttack are the functions you'll want to use most often for monster attacks. Missile: throws a projectile Melee: inflicts damage directly to target in range Combo: either missile or melee depending on range Railgun: railgun effect Bullet: hitscan effect (like shotgun or chaingun for example) Also A_MonsterRefire to create refiring loops (like arachnotrons or chaingunners). You can find them here. 0 Share this post Link to post
deepthought Posted June 25, 2010 speaking of A_CustomRailgun, how would you reccomend that i create 2 parallel railgun blasts at the same time (think force lightning)? 0 Share this post Link to post
Gez Posted June 25, 2010 BLAH A 6 A_FaceTarget BLAH A 0 A_CustomRailgun(params) BLAH A 8 A_CustomRailgun(params) Goto See Both railguns will be fired at the same time. Use the parameters to give them different offsets so that they're parallel instead of being fused. The durations I used (6 for A_FaceTarget and 8 for A_CustomRailgun) are just examples of reasonable values. You can use different ones. If you want several actions to take place at the same time, use several states that have all a length of zero tics, except the last one that has a normal length. (Actions are executed when the actor enters the new state, so with BLAH A 8 A_CustomRailgun, it fires the rail gun then waits 8 tics before going to the next state.) 0 Share this post Link to post
deepthought Posted June 25, 2010 OK. How can i get the guy to fire continously? I want him to blast you for about 5 seconds, walk around, blast you again, etc. 0 Share this post Link to post
Gez Posted June 25, 2010 Instead of Goto See, add another state where it calls A_MonsterRefire and then after that use Loop. The monster will continually refire (because of the loop) unless it loses line of sight (then A_MonsterRefire will put it back in the See state). If you want to have a limited time, you can do something like this pseudocode:Missile: A_SetArg(4, 0) MissileLoop: A_FaceTarget A_CustomRailgun etc. A_SetArg(4, args[4]+1) A_JumpIf(args[4] > 50, "See") A_MonsterRefire LoopHere you use the monster's args[4] value to keep track of how many times the monster went through its attack sequence. (See how it's initialized to 0 first, then increased by one at the end of each loop.) When that variable gets above a certain value (50 in the example, but adjust as appropriate depending on the total length of the attack sequence and how long you want them to stay in the loop, knowing that a second is made up of 35 tics), the monster is forcefully yanked to its See state. Otherwise, A_MonsterRefire is called to check the usual stuff (so that the monster will not keep firing if it loses line of sight). And then the state loop (going back to the last label, that is to say, MissileLoop), so that it fires again. 0 Share this post Link to post
deepthought Posted June 25, 2010 it says invalid state parameter A_SetArg 0 Share this post Link to post
Gez Posted June 25, 2010 Don't just copy that code directly, that's pseudo code, just to show the logic. It lacks sprite names, frames, durations, etc. 0 Share this post Link to post
Gez Posted June 25, 2010 Are you using Skulltag? Or an old (pre-2.4.0) version of ZDoom? 0 Share this post Link to post
Gez Posted June 25, 2010 Well, then, forget about using A_SetArg with ST. ST doesn't have that function yet. (On the ZDoom wiki, when a function, flag or other feature is marked with a "New", it means that ST does not have it. If it has an SVN tag, it means that the latest official version of ZDoom (2.4.1 at the moment) does not have it either.) 0 Share this post Link to post
deepthought Posted June 25, 2010 can U think of anything else? if not, i'll just replace the archvile fire with lightning as i was going to. 0 Share this post Link to post
deepthought Posted June 25, 2010 I've got it i'll just spawn a bunch of lightning balls. 0 Share this post Link to post
deepthought Posted July 4, 2010 i was wondering, is it possible to create an inventory item in doom that gives a player quad damage? 0 Share this post Link to post
Gez Posted July 5, 2010 Yes. http://zdoom.org/wiki/Classes:PowerDamage 0 Share this post Link to post
deepthought Posted July 7, 2010 Ok i got the powerup working. i also modded the wings of wrath to become a jetpack. only problem is that the icon for the powerup covers up the player mugshot. Also when iselect it, the mugshot is totally replaced with the icon. How do i prevent that? 0 Share this post Link to post