What I mean is, when you "summonfriend" a monster, once it sees a enemy, it pursues the enemy right? Well, until his enemy is dead. Then he starts to follow the player wherever he go. But sometimes it's annoying when this bot goes wherever you go because you wish it could go by itself through the level.
EDIT: Also check your repository and try pulling the new commits from mine!
Decorate Bot
- Gustavo6046
- Posts: 54
- Joined: Thu Nov 19, 2015 7:36 pm
- Location: Porto Alegre, Brazil
- Contact:
- Bootleg Guy
- Posts: 25
- Joined: Mon Jan 11, 2016 11:18 pm
- Location: Chile
- Contact:
Re: Decorate Bot
Well, I don't know how to do that, at most I think one could have to that the bot stays at a specified range from the player so it isn't as annoying.
Also did some major changes to the bot attack behaviour, its now able to use the weapons it has picked up! altough the +PICKUP flag doesn't work on zandro, it does work in zdoom, altough I have been thinking of giving the bot a random weapon once it spawns.
EDIT: Code is not that much of a mess now.
Also did some major changes to the bot attack behaviour, its now able to use the weapons it has picked up! altough the +PICKUP flag doesn't work on zandro, it does work in zdoom, altough I have been thinking of giving the bot a random weapon once it spawns.
Code: Select all
Missile:
PLAY A 1 A_JumpIfInTargetLOS("CheckMissile", 100)
Goto See
CheckMissile:
TNT1 A 0 A_JumpIfInventory("PlasmaRifle", 1, "MissilePlasma")
TNT1 A 0 A_JumpIfInventory("SuperShotgun", 1, "MissileSSG")
TNT1 A 0 A_JumpIfInventory("RocketLauncher", 1, "MissileRL")
TNT1 A 0 A_JumpIfInventory("Chaingun", 1, "MissileChaingun")
TNT1 A 0 A_JumpIfInventory("Shotgun", 1, "MissileShotgun")
MissilePistol:
PLAY E 4 A_FaceTarget
TNT1 A 0 A_PlaySound("weapons/chngun", CHAN_WEAPON)
PLAY F 6 A_CustomBulletAttack(3, 3, 1, random(1,3), "BulletPuff", 0, CBAF_NORANDOM)
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY E 4 A_FaceTarget
PLAY A 0 A_Jump(80, "Missile")
PLAY E 5 A_FaceTarget
Goto See
MissileChaingun:
TNT1 A 0 A_PlaySound("weapons/chngun", CHAN_WEAPON)
PLAY F 2 A_CustomBulletAttack(3, 3, 1, random(1,3), "BulletPuff", 0, CBAF_NORANDOM)
PLAY E 2 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
TNT1 A 0 A_PlaySound("weapons/chngun", CHAN_WEAPON)
PLAY F 2 A_CustomBulletAttack(3, 3, 1, random(1,3), "BulletPuff", 0, CBAF_NORANDOM)
PLAY E 2 A_FaceTarget
PLAY A 0 A_Jump(170, "Missile")
Goto See
MissileShotgun:
PLAY E 3 A_FaceTarget
TNT1 A 0 A_PlaySound("weapons/shotgf", CHAN_WEAPON)
PLAY F 7 A_CustomBulletAttack(5.6, 0, 7, random(4,5), "BulletPuff", 0, CBAF_NORANDOM)
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY E 14
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY E 13
PLAY A 0 A_Jump (130, "BackUp")
Goto See
MissilePlasma:
PLAY E 2 A_FaceTarget
PLAY F 1 A_CustomMissile("PlasmaBall", 32, 0, Random(-1, 1), CMF_AIMDIRECTION, Random(-1, 1))
PLAY E 2 A_FaceTarget
PLAY F 1 A_CustomMissile("PlasmaBall", 32, 0, Random(-1, 1), CMF_AIMDIRECTION, Random(-1, 1))
PLAY E 2 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY F 1 A_CustomMissile("PlasmaBall", 32, 0, Random(-1, 1), CMF_AIMDIRECTION, Random(-1, 1))
PLAY E 2 A_FaceTarget
PLAY F 1 A_CustomMissile("PlasmaBall", 32, 0, Random(-1, 1), CMF_AIMDIRECTION, Random(-1, 1))
PLAY E 2 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY F 1 A_CustomMissile("PlasmaBall", 32, 0, Random(-1, 1), CMF_AIMDIRECTION, Random(-1, 1))
PLAY A 0 A_Jump(60, "Missile")
Goto See
MissileSSG:
PLAY E 3 A_FaceTarget
TNT1 A 0 A_PlaySound("bot/ssg", CHAN_WEAPON)
PLAY F 7 A_CustomBulletAttack(11.2, 7.1, 20, random(4,5), "BulletPuff", 0, CBAF_NORANDOM)
PLAY E 17 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY EE 10 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY E 10 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY A 0 A_Jump (130, "BackUp")
Goto See
MissileRL:
PLAY E 4 A_FaceTarget
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY E 4 A_FaceTarget
PLAY F 12 A_CustomMissile("Rocket", 28, 0, Random(-1, 1))
TNT1 A 0 ThrustThing(Random(angle*256/360-192,angle*256/360+192), 10, 0, 0)
PLAY A 0 A_Jump (130, "Missile")
Goto See
Last edited by Bootleg Guy on Sat Apr 09, 2016 4:27 pm, edited 1 time in total.
- Sean
- IRC Operator
- Posts: 983
- Joined: Thu Jan 16, 2014 9:09 pm
- Location: United Kingdom
- Clan: Zandronum
- Clan Tag: [Za]
- Contact:
Re: Decorate Bot
Protip: Make your code more readable and consistent. It will save anyone reading your code - even you - time and pain in the future.Bootleg Guy wrote:Well, I don't know how to do that, at most I think one could have to that the bot stays at a specified range from the player so it isn't as annoying.
Also did some major changes to the bot attack behaviour, its now able to use the weapons it has picked up! altough the +PICKUP flag doesn't work on zandro, it does work in zdoom, altough I have been thinking of giving the bot a random weapon once it spawns.
Code: Select all
snip
<capodecima> i dont say any more word without my loyer jenova