Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TJDbunker Module

3 posters

Go down

TJDbunker Module Empty TJDbunker Module

Post by tjdagger Mon 17 Dec 2012, 14:01

TJDbunker Module Instructions1
TJDbunker Module Instructions2
TJDbunker Module Instructions3
TJDbunker Module Instructions4
TJDbunker Module Instructions5
TJDbunker Module Instructions6
TJDbunker Module Instructions7
TJDbunker Module Instructions8

Click the link below to Download TJD Bunker Modual

http://filebeam.com/441ec86ff375ef7062e7766b29059fb7

Download includes instructions PDF file, TJDbunkerMod.markerscollection.xml and EntityDataBased used... just in case.[url][/url]

tjdagger
Admin

Location : Silverdale, Queensland, Australia
Points : 107
Reputation : 7
Join date : 2012-12-17
Age : 48

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by Regg Sat 30 Mar 2013, 03:31

Pretty sure this is newer code... TJDbunkerMod.markerscollection.xml

I marked both scripts as version 1.1, and of course I've got a few comments/critiques next time you want to chat Twisted Evil
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by Regg Sat 06 Apr 2013, 20:02

tjdagger --

I've been playing with this module and love how easy it is to place these amazing structures! However, I did run into a couple issues, so far...

  1. TJD:addIgloo1() only works with directions ne, nw, se, & sw. It looks like the spawn sets for ea, no, so, & we are missing from the markers collection.

  2. TJD:addWatchTower() only generates a busted model. The auto-complete tells me to specify location, direction, guntype, & side but the function is expecting location, direction, guntype, status, & side. If I remove status from the list of parameters in the function definition, everything seems to work fine.

  3. TJD:addWatchTower() and TJD:addWaterTower() use the same busted model, watchtbust. Not sure if this was intentional, but I do see an entity set called watertbust.

  4. Is there a way to create a bunker/structure without soldiers? I tried setting the side to something other than us or pla, but then the weapon fails to spawn.
Thanks for all your efforts and keep up the fine work! Cheers pirat
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by tjdagger Fri 12 Apr 2013, 01:57

hi Regg, I've been under the radar a bit of late... just found your comments.

1. Yes, I did make the igloo to face only 4 directions as they have a broad rage of view from their window. However it seems in my laziness I simply cut and paste some info when setting up the auto complete.

2.Good find! Problem was this...
function TJD:addWatchTower(location,direction,guntype,status,side)
Checked a previous working version and found...
function TJD:addWatchTower(location,direction,guntype,side,status)
Which works fine. Spot the difference? How, when and why this changed is a great mystery to me.

3. I believe you found another example of me copying and pasting without applying modification. Simply change it to "waterbust" for the water tower... if you haven't already.

4. It would certainly be possible and is something I considered doing, but never got around to it. Mainly for the player to be able to jump up on a gun at the start of a mission etc.
We would need a method or perhaps another optional variable/boolean included to interrupt/control the spawning of units on guns?

Good finds Regg, I'm happy to see someone getting enjoyment out of it.
I think you might just appreciate how much complexity is going on in there?

Cheers,

tjdagger
Admin

Location : Silverdale, Queensland, Australia
Points : 107
Reputation : 7
Join date : 2012-12-17
Age : 48

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by Regg Fri 10 May 2013, 03:30

Definitely can appreciate the complexity of this mod. Again, fine work, mate! Cool

As I get deeper into the DR code maze, I'm finding there are numerous quirks. Trigger zones and the associated onEnter() & onLeave() functions are one of these troublesome areas. Timing, or the internal order of execution within the game, is another nuisance area. I'm sure you've already hit these issues (and your code confirms this).

In playing with these structures, I've come across an issue with them being placed too close to the player's starting point in a mission. From what I can tell, since the trigger zone is spawned after the player has entered the game, OFDR does not reliably trigger the onEnter() function. I've noticed this occasionally during single player, especially if I restart the mission, and almost always during co-op play.

It looks like you had a "triggercheck" in there, but removed it? (Around line 425 -- I added a couple lines to my file, but its near the beginning of the onSpawnedReady() function.)

I changed it to a serial timer (to account for multiple structures) which calls this function...

Code:
function triggercheck(zoneName, timerID)
    if OFP:isInTrigger(player_Named, zoneName) then
        TJD:activateBuilding(zoneName)
    end
    EDX:deleteTimer(timerID)
end

So far things seem to work, but I can't say its been fully tested. Was this similar to what you had? If so, why did you remove it? As I said, DR continues to throw more annoying quirks at me, so I might be missing something!

Cheers

PS -- EDX serial timers are a damn beautiful thing! cheers
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by John J. Stevens Fri 10 May 2013, 13:04

welcome to the alternate universe of the DR coder - this was a large reason EDX and similar modular code is beneficial to the designer.

Enjoy scratching your head over the logic behind a number of GETXXX commands without the matching SETXXX, some of the white list commands that were not put in to the editor manual and of course that EntityName restriction that forgets mixed case and doesn't allow "_".
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by Regg Fri 10 May 2013, 18:06

The list goes on and on...

Having started programming nearly 20 years ago (anyone remember line-numbering BASIC code?) and working with fully developed API's, certainly leaves a lot of things to be desired with the OFDR mission API. The more I learn about Lua, the more I appreciate its simplistic nature. Too bad CM never got to address all these issues!
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by John J. Stevens Fri 10 May 2013, 20:27

LUA is the magic behind this and YES I traveled that road and PASCAL, CPM and ASSEMBLY via my APPLE ][ and Z80 board - things just don't peek and poke like them ol' days

Crying or Very sad
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

TJDbunker Module Empty Re: TJDbunker Module

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum