Nexus Modding > Scripting

Burst Fire Weapon

<< < (2/2)

nasharas:
well actually it's easy done with weapons effects, simply add let's say three travel efx under one id and add to them delay function, and you got burst fire with three shots... done so far, but never managed to make them fire at the same point as first one shot...

Mularac:
yes, but there game is going to show only one shot as damage or as the end effect.

The Old Dragon:
I was wondering the same myself.

@Mularac:

You don't really need to know anything about the ships involved, to be honest. It's all about the weapons.

By selecting every object in the scene and then checking them for burstfire weapons, you can place all of these weapons into a list (as I'm currently working on both light and heavy versions, I use two lists). With that done each can be given it's own variable with which the game can track what's going on. As I said earlier, the main downside is the amount of repeated code involved.

The complete machine should be able to handle twenty of each type, but if you want to put the extra effort in, then there's no reason why it can't handle more.

EDIT:

Removed the code due to a serious flaw in the initial weapon selection. Worked fine on my test ship because the rule only worked on the one ship, getting it sorted now (fingers crossed).

Mularac:
There's, however, a problem with your code, Old_Dragon. Since there's no way to know beforehand how many devices of the same class would be available, the reasonable thing to would be to set about 20 to be safe, right? however, the PickN command would give an error if the index is out of range, but since that error is more like a warning the editor gives, it wouldn't matter in the campaign setting, however, we do know that too much coding can make nexus buggy as hell.
Each ship may carry tops, lets say 4 weapon slots for that kind of weapon. And in the game there can be about 27 ships (lets make it a mere 12, as I doubt there would be any more ships than that at a scene at a time), so for now we have 48 different entries. And that's leaving out the code involved in including ships that may appear or drop from hyperspace later on, so the ammount of code may very well be too much for nexus to handle, and we all know how buggy it can get, specially in campaign mode.

The Old Dragon:
Hmmm, sometimes it can. That little 'just for fun ' mission I put together contains quite a bit of heavy coding and it ran fine here on my laptop (well, at least up untill about level five, lol).
And on top of that N:TAA is starting to get quite complicated with some missions weighing in at up to a hundred k or so without the additional 'include' files that it requires, apart from a rather annoying bit, it's not really struggling.

But, things like the index being out of range (wrestled with that one a few times) Shouldn't be a problem as the code progresses upwards with each entry and once mapped, the PickN command would only be required again if the rule were to be rerun (as in late arriving ships). In which case, the entire list would be cleaned and remapped.  

Though I do agree about the number of weapons being involved could get a bit too much. Maybe by opening up such ideas to a bit of public scrutiny then we can learn better ways doing things? Because if it wasn't for these forums, then I doubt I would of got anyway near where I am now.

So if anyone has any ideas on how to refine the code, then I'm all ears.

Navigation

[0] Message Index

[*] Previous page

Go to full version