Decorate Bot

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
User avatar
Gustavo6046
 
Posts: 54
Joined: Thu Nov 19, 2015 7:36 pm
Location: Porto Alegre, Brazil
Contact:

Re: Decorate Bot

#21

Post by Gustavo6046 » Fri Apr 08, 2016 11:34 pm

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!

User avatar
Bootleg Guy
 
Posts: 25
Joined: Mon Jan 11, 2016 11:18 pm
Location: Chile
Contact:

Re: Decorate Bot

#22

Post by Bootleg Guy » Sat Apr 09, 2016 3:21 pm

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

	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
EDIT: Code is not that much of a mess now.
Last edited by Bootleg Guy on Sat Apr 09, 2016 4:27 pm, edited 1 time in total.

User avatar
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

#23

Post by Sean » Sat Apr 09, 2016 3:43 pm

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
Protip: Make your code more readable and consistent. It will save anyone reading your code - even you - time and pain in the future.
<capodecima> i dont say any more word without my loyer jenova

Post Reply