DLL function?

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

DLL function?

Post by bigbadbogie »

Is there any DLL function that can check the angle of the terrain at a particular location?

Or how 'flat' it is?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: DLL function?

Post by General BlackDragon »

I believe GetTerrainHeightAndNormal can. It outputs the normal (facing vector) of the terrain.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: DLL function?

Post by Red Devil »

taking a shot in the dark here guessing your recycler won't deploy, in which case you can just use this:

[DeployBuildingClass]
DoExtraBuildzoneCheck = false // false = 1.0 .. 1.3pb1 behavior, true = pb2 .. current
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: DLL function?

Post by Nielk1 »

Red Devil wrote:taking a shot in the dark here guessing your recycler won't deploy, in which case you can just use this:

[DeployBuildingClass]
DoExtraBuildzoneCheck = false // false = 1.0 .. 1.3pb1 behavior, true = pb2 .. current
If that was the issue he would just make the map flatter in the area. My guess is he has something more complex in mind.
And besides, that is a stop gap used for making old maps work and should not be used if you can help it.
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: DLL function?

Post by Red Spot »

Do you want to control where units try to go, or what path they may follow without making them follow a specific path? (and so are more reluctant to open fire)
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: DLL function?

Post by bigbadbogie »

Nah, it's got nothing to do with Recy deployment or units.

It's about map object placement.

GBD's idea worked. Thanks again!!

@RD, RS - Thanks anyway!
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: DLL function?

Post by Nielk1 »

I had a feeling it had to do with object placement. He might need to apply the ground angle to the object's matrix, it might be spawning straight up and down.
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: DLL function?

Post by bigbadbogie »

How would I do that, N1?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: DLL function?

Post by Nielk1 »

Assuming you get a vector tangent to the normal face of the terrain, you would need to rotate the vector so its parallel to the ground (add 90 on some axis) and then convert it to the rotation elements of the matrix. You may need to throw in some normalization too in case you go out of the common bounds and hit wrap around (specifically after your vector rotation and before your matrix conversion).
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: DLL function?

Post by Nielk1 »

Look at Rodrigues' rotation formula, or try to convert this mess into something usable: http://stackoverflow.com/questions/1855 ... ion-matrix (The issue with this link is his storage of the matrix as a series of 3 value columns rather than your common rows, unless the flipped the entire matrix, which is possible.)
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: DLL function?

Post by bigbadbogie »

I wouldn't even know where to begin with that. I'm a simple modder - not a mathematical prodigy.

I have another way for the spawning objects to face in the direction of the terrain; simply spawn a plantClass object first and immediately replace it with the other object. PlantClass objects automatically face the direction of the terrain they are on.

I'd only understand your method if it was explained to me step-by-step (well... possibly).
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: DLL function?

Post by bigbadbogie »

I have another question:

Is there a DLL function to reset the unit dialogue backlog?

E.g. If a long mission voiceover finishes, prevent every single unit order that was given during that voiceover from playing its sound afterwards.

(Offensive unit lost, offensive unit lost, offensive unit lost, yes sir, offensive unit lost, target down, offensive unit lost, offensive unit lost, offensive unit lost, offensive unit lost..... you get the idea.)
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: DLL function?

Post by Red Spot »

Best thing, imo, is too simply not have such voice overs in the ODF's. They may be nice for the first 2 times you hear them, then they just get plain annoying.
N1 will probably know if its possible to skip them with a dll-function though.
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: DLL function?

Post by General BlackDragon »

bigbadbogie wrote:I have another question:

Is there a DLL function to reset the unit dialogue backlog?

E.g. If a long mission voiceover finishes, prevent every single unit order that was given during that voiceover from playing its sound afterwards.

(Offensive unit lost, offensive unit lost, offensive unit lost, yes sir, offensive unit lost, target down, offensive unit lost, offensive unit lost, offensive unit lost, offensive unit lost..... you get the idea.)

Not that I am aware.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: DLL function?

Post by bigbadbogie »

That has been one of BZ's major irritations since day one. I wish there was a way to fix it.
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
Post Reply