EDuke32 Scripting "CON coding help"
#1201 Posted 28 March 2013 - 02:28 AM
This post has been edited by Fox: 28 March 2013 - 04:20 AM
#1202 Posted 28 March 2013 - 05:57 AM
Fox, on 28 March 2013 - 02:28 AM, said:
Yup, some condition checks are side-effecting. In this case, ifhitweapon unconditionally runs the routine that incurs the damage on the actor, so there won't be any left for the second and following times. CON is full of strange corners like this.
#1203 Posted 29 March 2013 - 04:09 AM
sin SIN player[THISACTOR].ang cos COS player[THISACTOR].ang setvar HORIZ 100 subvarvar HORIZ player[THISACTOR].horiz subvarvar HORIZ player[THISACTOR].horizoff mulvar HORIZ 32 hitscan player[THISACTOR].posx player[THISACTOR].posy player[THISACTOR].posz player[THISACTOR].cursectnum COS SIN HORIZ HITSECT HITWALL HITSPRITE HITX HITY HITZ CLIPMASK1
This post has been edited by Fox: 29 March 2013 - 04:10 AM
#1204 Posted 29 March 2013 - 05:07 AM
#1205 Posted 29 March 2013 - 06:09 AM
This post has been edited by Fox: 29 March 2013 - 06:10 AM
#1206 Posted 29 March 2013 - 07:05 AM
If this is your first time using hitscan I suggest spawning a little fullbright sprite at the hitx hity hitz coords as a test. Make it an actor that lasts only one tic. Then you will have visual confirmation of where you are actually hitscanning.
#1207 Posted 29 March 2013 - 07:23 AM
#1208 Posted 29 March 2013 - 07:33 AM
Fox, on 29 March 2013 - 04:09 AM, said:
sin SIN player[THISACTOR].ang (...)
Well, apparently the inline player[THISACTOR].somemember accesses don't work as expected in C-CON. This is similar to what you reported here. Thanks for the test case, I'll add it to our lot.
[Note: I haven't actually checked the results of the inline struct accesses, but in LunaCON, the code works correctly.]
#1209 Posted 29 March 2013 - 07:41 AM
Mikko_Sandt, on 29 March 2013 - 07:23 AM, said:
Not really, cutscenes are super hard-coded.
#1210 Posted 29 March 2013 - 07:52 AM
#1211 Posted 29 March 2013 - 07:59 AM
Mikko_Sandt, on 29 March 2013 - 07:52 AM, said:
That's how older TCs did it. Blank one frame .ANM files, or blank images for the still images that are housed in the ART files.
You still have to deal with sound effects that are hard-coded with cinematics like for the Battle-lord, though.
This post has been edited by Commando Nukem: 29 March 2013 - 08:00 AM
#1212 Posted 31 March 2013 - 05:25 AM
#1214 Posted 31 March 2013 - 12:39 PM
This post has been edited by Mikko_Sandt: 31 March 2013 - 12:40 PM
#1215 Posted 02 April 2013 - 04:38 AM
How to modify the tiles num of weapons in the con code, to change their appearance ?
#1216 Posted 02 April 2013 - 04:45 AM
#1217 Posted 02 April 2013 - 05:10 AM
#1218 Posted 07 April 2013 - 07:57 AM
#1219 Posted 08 April 2013 - 06:17 AM
#1220 Posted 16 April 2013 - 05:35 AM
Edit: The projectiles are RPG-like.
This post has been edited by Mikko_Sandt: 16 April 2013 - 05:35 AM
#1222 Posted 16 April 2013 - 06:53 AM
#1223 Posted 16 April 2013 - 08:33 AM
can someone help me with this problem
Im using transport elevator (SE 17) and I have done everything correctly...
but there is in 0:02 a little lag and I dont know why...
It seems, this is problem even in original maps(Episode 3 level 4 example L.A Rumble)...i tried few things but problem is still there.
This "lag" appears only when elevator is going up, when you are going down its OK...
any suggestions? maybe its a old problem, but is there some solution for this?
thanks,
#1224 Posted 16 April 2013 - 08:39 AM
#1225 Posted 16 April 2013 - 08:46 AM
Fox, on 16 April 2013 - 08:39 AM, said:
thanks for reply, so there isnt some way how to solve it? Trough CON, or maybe write my own teleport elevators...
#1226 Posted 16 April 2013 - 09:22 AM
Fox, on 16 April 2013 - 06:53 AM, said:
So I guess that means it's time to dig up the trigonometry book...
#1227 Posted 16 April 2013 - 09:54 AM
Biturbo, on 16 April 2013 - 08:46 AM, said:
if it's any consolation, you also notice this glitch in the original game.
#1228 Posted 16 April 2013 - 11:35 AM
Mikko_Sandt, on 16 April 2013 - 05:35 AM, said:
Edit: The projectiles are RPG-like.
Would declaring these projectiles as DEVISTATOR-like (sic) do the trick? Here's what happens, from player.c:A_ShootWithZvel(), irrelevant parts omitted.
else if (PWEAPON(0, g_player[p].ps->curr_weapon, WorksLike) == DEVISTATOR_WEAPON) { // (...) if (g_player[p].ps->hbomb_hold_delay) { sprite[j].x -= sintable[sa&2047]/644; sprite[j].y -= sintable[(sa+1024+512)&2047]/644; } else { sprite[j].x += sintable[sa&2047]>>8; sprite[j].y += sintable[(sa+1024+512)&2047]>>8; } // (...) }
The thing to note here is that the offset in the two directions is not the same even if symmetry around the center is to be achieved.
#1229 Posted 17 April 2013 - 03:32 AM
#1230 Posted 17 April 2013 - 02:11 PM
Thanks!
EDIT: Nevermind, it looks like everything is in the APLAYER actor. Perhaps it's not even standard behavior, I've just been working with my old Fusion CONs as a base ever since I finished it...
This post has been edited by Diaz: 17 April 2013 - 02:20 PM