That error specifically is because you're using it as a class variable, rather than a function variable. In cases like that I'd recommend marking the FLineTraceData variable as "transient" just so it doesn't get serialized (same workaround as with CVar structs). I'm pretty sure ZZYZX decided on commenting it out because it's not exported, but from the way my trace function is designed, that variable does need to be there, since the ffloor variable is useful to check for in some cases (e.g.: if it is non-null then the line/plane hit is part of a 3d floor, and such).AFADoomer wrote:I think it's because the FLineTraceData struct contains the F3DFloor entry (here), despite it not being exported... Interestingly enough, the TraceResults struct has the F3DFloor piece commented out.Marisa Kirisame wrote:ZScript is also prone to breaking if you aren't careful. I see you got a save error there.
I guess it'll go away after I export F3DFloor.
[Wolfenstein: Blade of Agony] v3.1 released (p204)
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: [Blade of Agony] Drivable Tanks! | p160
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: [Blade of Agony] Drivable Tanks! | p160
I feel like reading an ancient language...Marisa Kirisame wrote:That error specifically is because you're using it as a class variable, rather than a function variable. In cases like that I'd recommend marking the FLineTraceData variable as "transient" just so it doesn't get serialized (same workaround as with CVar structs).
-
- Posts: 266
- Joined: Fri Mar 16, 2018 7:44 am
Re: [Blade of Agony] Drivable Tanks! | p160
@ Tormentor667
Interesting, thanks for the explanation.
One more question, are tank md3 parts animated or static model?
I wanted to do something similar for my AT-ST, but his body/legs must be frame animated while moving, can your Zscript tank logic handle frames?
For example..AT-ST walking (md3 frames from X to Y) while rotating upper body/turret and shooting.
Cheers
Interesting, thanks for the explanation.
One more question, are tank md3 parts animated or static model?
I wanted to do something similar for my AT-ST, but his body/legs must be frame animated while moving, can your Zscript tank logic handle frames?
For example..AT-ST walking (md3 frames from X to Y) while rotating upper body/turret and shooting.
Cheers
-
- Posts: 1339
- Joined: Tue Jul 15, 2003 4:18 pm
Re: [Blade of Agony] Drivable Tanks! | p160
Yes, I'm sampling at the four corners of the tank model using GetZAt, calculating the relative offset from floors, then using those values to calculate pitch and roll.Nash wrote:AFADoomer - can you tell us more about the tank physics and aligning the tank to sloped terrain? Are you sampling from 4 points of the tank and calculating the pitch and roll from there? Is that what the line traces are doing?
Code: Select all
// Handling for terrain-based pitch/roll calculations...
void SetPitchRoll(Actor mo)
{
if (!mo) { mo = self; }
double points[5], minz = 0x7FFFFFFF, maxz = -0x7FFFFFFF;
points[0] = mo.floorz;
// Get the relative z-height at the four corners of the tank
points[1] = mo.GetZAt(Radius, Radius) - points[0];
points[2] = mo.GetZAt(Radius, -Radius) - points[0];
points[3] = mo.GetZAt(-Radius, Radius) - points[0];
points[4] = mo.GetZAt(-Radius, -Radius) - points[0];
for (int i = 1; i <= 4; i++)
{
if (points[i] > MaxStepHeight) { points[i] = 0; } // Ignore the point if you can't climb that high
}
// Use those values to calculate the pitch.roll amounts
double pitchinput = (points[2] + points[1]) - (points[4] + points[3]);
double rollinput = (points[2] + points[4]) - (points[1] + points[3]);
pitchinput = atan(pitchinput / (Radius * 2));
rollinput = atan(rollinput / (Radius * 2));
mo.pitch = clamp(mo.pitch, -30, 30);
mo.roll = clamp(mo.roll, -30, 30);
// Interpolate to the new values
if (mo.pitch > -pitchinput) { mo.pitch = max(mo.pitch - 1, -pitchinput); }
if (mo.pitch < -pitchinput) { mo.pitch = min(mo.pitch + 1, -pitchinput); }
if (mo.roll > rollinput) { mo.roll = max(mo.roll - 1, rollinput); }
if (mo.roll < rollinput) { mo.roll = min(mo.roll + 1, rollinput); }
}
It handles basic animation right now... The treads move when the base of the tank moves. For a proper walking animation, there would probably need to be some added handling for smoothly moving from standing to walking and back, but the core code would still work.HAL9000 wrote:@ Tormentor667
Interesting, thanks for the explanation.
One more question, are tank md3 parts animated or static model?
I wanted to do something similar for my AT-ST, but his body/legs must be frame animated while moving, can your Zscript tank logic handle frames?
For example..AT-ST walking (md3 frames from X to Y) while rotating upper body/turret and shooting.
Cheers
-
- Posts: 131
- Joined: Wed Nov 30, 2016 12:51 am
- Graphics Processor: nVidia with Vulkan support
Re: [Blade of Agony] Drivable Tanks! | p160
I've gotta say, the ZScript work that AFADoomer has done is impressive.
We're seriously starting to see some of the much greater possibilities due to ZScript.
We're seriously starting to see some of the much greater possibilities due to ZScript.
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: [Blade of Agony] Drivable Tanks! | p160
[imgur]https://i.imgur.com/MQM6yBw[/imgur]
Last edited by Blue Shadow on Fri Mar 30, 2018 6:30 pm, edited 1 time in total.
Reason: Used [imgur] tag on screenshots.
Reason: Used [imgur] tag on screenshots.
-
- Posts: 5032
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Blade of Agony] Tank Battlefield Screens! | p161
Reminder for next time: viewtopic.php?f=48&t=57325
-
-
- Posts: 16891
- Joined: Tue Oct 02, 2012 2:20 am
- Location: An ancient Escape Shuttle(No longer active here anymore)
Re: [Blade of Agony] Tank Battlefield Screens! | p161
...Large Image Derp aside, that tank scene looks Tankin' Amazing!! Hope the control isn't so bad, tho! 

-
- Posts: 45
- Joined: Sat Sep 30, 2017 1:17 am
- Graphics Processor: nVidia with Vulkan support
Re: [Blade of Agony] Tank Battlefield Screens! | p161
Is there going to be some sort of First Person/Gunner views for the tanks?
-
- Posts: 101
- Joined: Sun Jun 19, 2016 6:08 pm
- Location: The Netherlands
Re: [Blade of Agony] Tank Battlefield Screens! | p161
Oh cool, new screenshots of BOA. How is far is the progress on map building?
-
- Posts: 2067
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
Re: [Blade of Agony] Tank Battlefield Screens! | p161
@GeneralDelphox - It is not planned, but never say never
@TDG - You can spoil yourself checking github development
HAPPY EASTER EVERYBODY, and in case you wonder I am the dude who ripped models for that Sherman tank, from CoD2 with slightly edits and adjustments on a total of 6 model parts for main actor and 4 model parts for destroyed one.
@TDG - You can spoil yourself checking github development

HAPPY EASTER EVERYBODY, and in case you wonder I am the dude who ripped models for that Sherman tank, from CoD2 with slightly edits and adjustments on a total of 6 model parts for main actor and 4 model parts for destroyed one.
-
- Posts: 1467
- Joined: Sun Mar 14, 2010 2:52 am
Re: [Blade of Agony] Tank Battlefield Screens! | p161
Will the next chapter be more run-n-gun action and less stealth and rescue-mission oriantated than the previous one?
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
-
- Posts: 768
- Joined: Thu Jun 11, 2015 1:58 am
- Graphics Processor: nVidia with Vulkan support
- Location: Everywhere and nowhere.
Re: [Blade of Agony] Tank Battlefield Screens! | p161
How much of Chapter 3 would you say is done at this point?
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: [Blade of Agony] Tank Battlefield Screens! | p161
About 25%, it’s still a lot of work left