Help Please (Multiple Things)

Discuss all aspects related to modding Zandronum here.
Post Reply
CtrlAltDestory
ย 
Posts: 29
Joined: Fri Dec 28, 2012 5:17 am

Help Please (Multiple Things)

#1

Post by CtrlAltDestory » Thu Aug 15, 2013 2:35 am

So, Ive been trying to do a few things but with the limited knowledge I have I really don't think that I can do it. If someone could help me figure out how to do the following I would be grateful:

1. When you look at a Specific Actor it would tell you something in the middle of the screen and it would not fade away until you looked away.

2. A dynamic round system that would slowly spawn monsters to a certain point until it hits monster cap while at the same time dynamically making them stronger each round.

Klofkac
Forum Regular
Posts: 481
Joined: Sat Jun 09, 2012 1:31 pm
Location: Ask Grandvoid servers

RE: Help Please (Multiple Things)

#2

Post by Klofkac » Thu Aug 15, 2013 6:46 pm

The first you can hack with checking angle range looking at that actor. If you were paying attention in maths and physics you can know how to work with vectors. You can use VectorAngle function.

Code: Select all

script 1 (void) //Activator is player, the actor has TID 1
{
while(1) {
 int lookangle,vector;
 lookangle = GetActorAngle(0);
 vector = VectorAngle(GetActorX(1)-GetActorX(0),GetActorY(1)-GetActorY(0));
 if(vector-lookangle > -0.1 && vector-lookangle < 0.1) 
 {
    HudMessage(s:"Stop looking at me, I am shy!";HUDMSG_PLAIN0,1,CR_WHITE,0.5,0.5,0.1);
 }
delay(1);
}}
Note that walls will obstcure it, so you will probably need distance check.

The second can be achieved by ThingCount, SetActorProperty etc. There are alot of functions, be sure to check ZDoom Wiki.
Last edited by Klofkac on Thu Aug 15, 2013 6:58 pm, edited 1 time in total.
๐•‚๐•๐• ๐•—๐•œ๐•’๐•”

CtrlAltDestory
ย 
Posts: 29
Joined: Fri Dec 28, 2012 5:17 am

RE: Help Please (Multiple Things)

#3

Post by CtrlAltDestory » Thu Aug 15, 2013 7:17 pm

Klofkac wrote:-snip-
Sadly I was never taught Vectors, I will try and learn it right away.

User avatar
ร†nima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: Help Please (Multiple Things)

#4

Post by ร†nima » Thu Aug 15, 2013 8:56 pm

Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Klofkac
Forum Regular
Posts: 481
Joined: Sat Jun 09, 2012 1:31 pm
Location: Ask Grandvoid servers

RE: Help Please (Multiple Things)

#5

Post by Klofkac » Fri Aug 16, 2013 11:24 am

ร†nima wrote: You could also try http://zdoom.org/wiki/A_JumpIfInTargetLOS
I guess that could work, but...
For weapons and inventory, jumps if the player has a suitable line target under their crosshair.
Doesn't this mean that it activates when player looks at any monster?

Edit, found a function called CheckSight, but I doubt it is ported to zan.
Last edited by Klofkac on Fri Aug 16, 2013 11:31 am, edited 1 time in total.
๐•‚๐•๐• ๐•—๐•œ๐•’๐•”

User avatar
ร†nima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: Help Please (Multiple Things)

#6

Post by ร†nima » Fri Aug 16, 2013 2:31 pm

Klofkac wrote:
ร†nima wrote: You could also try http://zdoom.org/wiki/A_JumpIfInTargetLOS
I guess that could work, but...
For weapons and inventory, jumps if the player has a suitable line target under their crosshair.
Doesn't this mean that it activates when player looks at any monster?
No, he'll be calling the function on the monster itself, which will check if the player is looking at it.
Last edited by ร†nima on Fri Aug 16, 2013 2:32 pm, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Klofkac
Forum Regular
Posts: 481
Joined: Sat Jun 09, 2012 1:31 pm
Location: Ask Grandvoid servers

RE: Help Please (Multiple Things)

#7

Post by Klofkac » Fri Aug 16, 2013 2:45 pm

*sigh* Why does Zan have to be so behnid? CheckSight doesn't compile.
I guess you have to use the DECORATE then...
๐•‚๐•๐• ๐•—๐•œ๐•’๐•”

Post Reply