ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CPA_CustomMissile/CPW_CustomMissile

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing
View previous topic :: View next topic  
Author Message
Maikl_Russia
has entered the game!


Joined: 18 Jul 2005
Location: RU

PostPosted: Wed Dec 30, 2015 11:40 am    Post subject: CPA_CustomMissile/CPW_CustomMissile Reply with quote

Hi all.

Can anybody explain (with examples): how to use Args4 and 5 in these codepointers? We encountered difficulties in the selection of the correct values. Sad Sad Sad

Args1 - missiletype. It works fine.
Args2 - spawnheight. It use the same numbers like "Height" field in dehacked: real height << 16
Args3 - spawnofs_horiz. It uses usual values: 10, 32, -8, -17 or 40. This Args shifts the point of shoot at left or at right from actor's view (not closer or farther from actor). For example - Mancubus shots.
Args6 - firing sound. It works fine. Use dehacked number.

Args4 - angle. "The direction relative to the monster's facing angle in which to shoot the missile." What values we may use here??? 32, 0.25, 64.0, 2097152 .... ???? Any value not works. Sad
Args5 - pitch... No ideas what is it and how it works.

Many of Args7 flags depends on Args4/Args5.
Back to top
View user's profile Send private message
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Wed Dec 30, 2015 7:48 pm    Post subject: Reply with quote

http://zdoom.org/wiki/A_CustomMissile

not ACS related 3
Back to top
View user's profile Send private message Send e-mail
Maikl_Russia
has entered the game!


Joined: 18 Jul 2005
Location: RU

PostPosted: Wed Dec 30, 2015 9:16 pm    Post subject: Reply with quote

Thanx Medis, but let me repeat:
Args4 - angle. "The direction relative to the monster's facing angle in which to shoot the missile." What values we may use here??? 32, 0.25, 64.0, 2097152 .... ???? Any value not works. Sad
Back to top
View user's profile Send private message
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Wed Dec 30, 2015 10:11 pm    Post subject: Reply with quote

Apparently there seems to be bug with:
Args4 (works, however by default when target is set, is angle ignored)

Needs serious demo wad and further test.
(irc)


Last edited by Aeyesx on Wed Dec 30, 2015 11:51 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Maikl_Russia
has entered the game!


Joined: 18 Jul 2005
Location: RU

PostPosted: Wed Dec 30, 2015 11:08 pm    Post subject: Reply with quote

Aeyesx wrote:
Args4 (works, however by default when target is set, is angle ignored

Shocked Are monsters will shoots without any target? As i know, if monster has no target he enters in Spawn/Idle state.

Aeyesx wrote:
Needs serious demo wad and further test. (irc)

CPA_CustomMissile_test.wad 342 bytes (with comments) Very Happy
Back to top
View user's profile Send private message
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Wed Dec 30, 2015 11:53 pm    Post subject: Reply with quote

I admit, but it works if you use pitch, but it should work even without

Last edited by Aeyesx on Mon Feb 20, 2017 1:14 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
DIABOLIST
has entered the game!


Joined: 30 Dec 2015

PostPosted: Sat Jan 02, 2016 6:56 pm    Post subject: Reply with quote

Hello. I used all possible options for these codepointers but they works incorrectly.
Can anyone tell what I did wrong? Question
There's my test wad (with comments): http://rghost.ru/6Xk4Fpmqx
Back to top
View user's profile Send private message
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Sun Jan 03, 2016 9:47 pm    Post subject: Reply with quote

DIABOLIST nothing, yet ... doesn't worth to check... Because theres really bugged angle..

BUT! Don't modify spritesfrom doom2.wad. You're wad has like 4 mb but it could have just 20 Kb's if you re-colored them using ACS instead of manuall sprite edits.
Back to top
View user's profile Send private message Send e-mail
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Tue Jan 10, 2017 10:41 am    Post subject: Reply with quote

Sorry for never answering this... The angle calculation is just very unique, I had saved my note of the calculation somewhere....

I was suggesting to put an information of how to calculate the angle into the changelong, even made the edits, but Kilgore had little of time to update it since then.

But it certainly does work, and it is very accurate...
Back to top
View user's profile Send private message Send e-mail
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Mon Feb 20, 2017 3:38 pm    Post subject: Reply with quote

Adding informations related to this.

When the function was developed.
I saved those notes from Kilgore. They are not cleared ordered but could be helpfull. Hopefully no harm by posting it here, I made attempt so it appears in changelog but its somwhere stuck a bit

Some facts:
<Kilgore> franken-param
<Kilgore> not only Args7.. the whole design is from hell
<Kilgore> args4 (the angle)...
<Kilgore> it's sometimes used depending on Args7
<Kilgore> *IF* it contains CMF_AIMDIRECTION.. then Args4 is used
<Kilgore> *IF* it contains CMF_ABSOLUTEANGLE...
<Kilgore> then Args4 means "use that angle"
<Kilgore> otherwise (if it contains CMF_AIMDIRECTION), it's "use that angle + the angle of the actor"

Some recapitulation:
<Kilgore> a. if Args7 does NOT have CMF_ABSOLUTEANGLE OR CMF_AIMDIRECTION, then it does NOT use the angle at all
<Kilgore> b. if Args7 has BOTH CMF_ABSOLUTEANGLE AND CMF_AIMDIRECTION, then it uses the specified angle, NO MATTER where the actor is looking it
<Kilgore> c. if Args7 has only CMF_AIMDIRECTION, then it uses the specified angle PLUS the angle of the actor
<Kilgore> d. if Args7 has only CMF_ABSOLUTEANGLE, i'm not sure... could be like case b, or it could be invalid


And how to calculate the angle:
(Try to figure it out from those notes, it works)

<Kilgore> ok... with angles...
<Kilgore> i'm pretty sure it goes like this...
<Kilgore> 0 --> 0
<Kilgore> 180 -> 2G
<Kilgore> -180 -> 2G
<Kilgore> G = 1024*1024
<Medis> so lets try angle 45
<Kilgore> 90 -> 1G
<Kilgore> 45 -> 1G/2 = 1024*1024/2 = 524.288
<Kilgore> wait.. let me think again
<Kilgore> looks too small
<Kilgore> yeah...
<Kilgore> G = 1024*1024*1024
<Kilgore> so 45 = 1G/2 = 536.870.912
<Kilgore> always do it with respect to G
<Kilgore> it's easier that way
<Kilgore> remember that 180 = 2G
<Kilgore> or.. 90 = 1G
<Kilgore> and 1G = 1024*M = 1024*1024*K = 1024*1024*1024
<Medis> So .. for test purposes... Args 4 = 536.870.912 ?
<Medis> thanks for information, help
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group