Author Topic: Using Specific Weapon on Specific Target Help Pwease?  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

Offline Hyper Ion

  • 26
  • I'm insane. Deal with it.
Using Specific Weapon on Specific Target Help Pwease?
Here's the premise folks. I want Beta wing, for everytime I order it to destroy a specific subsytem, to use a specific type of secondary. Because the 'order' SEXP is stupid and doesn't include an argument such as what subsystem to destroy, I've had to get innovative here. By innovative, I mean include another argument to be fulfilled alongside the 'order' one. I now present to you, O' forum goers, a diagram.



Problem 1 with this whole thing is what's highlighted, the number aka Argument 2.

Argument 2 wants a number for how long the target should be kept. Normally, I would slap in the number 1, but the key word of this argument is should. I'm worried that if I do put in '1' for this argument, that the whole thing will be returned false when I've targeted the Leviathan's weapons subsystems for more than 1 second.

My first thought was to just not fill in Argument 2 of the 'Target' SEXP. However, FRED complains and what's something there. Any thoughts from you peeps?

Problem 2 is my fear of other ships with Stilletos using them on other subsystems of the Leviathan, such as the engine. I don't want that, unfortunately. I have a few plans to circumvent this, like temporarily depleting the ammo of that specific secondary for ships not assigned to destroy the weapons subsystem, but this requires some effort that I, as a novice at FRED, am not comfortable trying without higher-up advice.

So, any ideas are welcome.

P.S. Why do I keep posting my most important questions this late at night?
"Your ignorance is my bliss... well, unless it affects me negatively."

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Using Specific Weapon on Specific Target Help Pwease?
OK I'm winging this one so it might not work.

Create variably fire[0]

Ordered
Everytime
--time-elapsed-last-order
----beta
----1
--lock-primary
----(all ships in beta)
--modify-variable
----fire[0]
----1

Attack
Everytime
--and
---- =
------fire[0]
------1
---- <
------distance
--------beta
--------(ship)
-------(weapon range)
--add-goal
-----beta
-----(attack ship)
-----(ship)
-----89
--modify-variable
----fire[0]
----2

Reset
everytime
-- =
----fire[0]
----2
--unlock-primary-weapon
--modify-variable
---fire[0]
---0

Like I said I'm not sure if that will work and there probably is an easier way.  Also you will probably need to do it for each ship in beta. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Using Specific Weapon on Specific Target Help Pwease?
Here's the premise folks. I want Beta wing, for everytime I order it to destroy a specific subsytem, to use a specific type of secondary. Because the 'order' SEXP is stupid and doesn't include an argument such as what subsystem to destroy, I've had to get innovative here.

Add that to Mantis and assign it to me. Can't promise I'll get it fixed quickly because it's a little more complicated than just adding it to the SEXP (The list of orders given doesn't keep track of the subsystem either so that would need fixing first) but it's probably something that should be fixed.

Quote
Problem 1 with this whole thing is what's highlighted, the number aka Argument 2.

Argument 2 wants a number for how long the target should be kept. Normally, I would slap in the number 1, but the key word of this argument is should. I'm worried that if I do put in '1' for this argument, that the whole thing will be returned false when I've targeted the Leviathan's weapons subsystems for more than 1 second.

That's not a problem, it's the other way round actually. The SEXP returns false if the ship/subsystem has been targeted for less time than this. You should probably set the value to 0 not 1 so that you don't get problems if the player is quick about giving the order.


Oh, a word of warning before you go any further. I do not recommend using 3.6.9 Official for testing this. There is a bug in 3.6.9 where all orders from previous missions you have played since starting the game are still seen by the Order SEXP. So the mission would work perfectly the first time but on subsequent tests everything would fire stilettos right from the start of the mission.

If you have BtRL copy the exe from that into your FS2 folder. If not any other build from after January will work.

That bug is I suspect the reason why :v: made the Order Sexp but never actually used it in the training mission it was no doubt created for.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Hyper Ion

  • 26
  • I'm insane. Deal with it.
Re: Using Specific Weapon on Specific Target Help Pwease?
Oh, a word of warning before you go any further. I do not recommend using 3.6.9 Official for testing this. There is a bug in 3.6.9 where all orders from previous missions you have played since starting the game are still seen by the Order SEXP. So the mission would work perfectly the first time but on subsequent tests everything would fire stilettos right from the start of the mission.

If you have BtRL copy the exe from that into your FS2 folder. If not any other build from after January will work.

That bug is I suspect the reason why :v: made the Order Sexp but never actually used it in the training mission it was no doubt created for.
Would a clear-goals SEXP fired at the beginning of the mission remedy this?

Pardon my ignorance, but I've heard of Mantis, but have no idea how exactly to use it. It seems odd that I'm registering to report one thing. I'll look into it anyways, but I feel like I waste bandwidth for such a minor purpose.
« Last Edit: December 24, 2007, 11:20:40 am by Hyper Ion »
"Your ignorance is my bliss... well, unless it affects me negatively."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Using Specific Weapon on Specific Target Help Pwease?
http://scp.indiegames.us/mantis/main_page.php

It's pretty easy to use. You register just like a forum. Type in the details of the problem, assign it a priority of feature and choose my username as the coder it's assigned to (in this case - Usually you DO NOT assign a coder).

Pretty much anyone who is a good FREDder will discover a bug sooner or later so it's worth registering anyway. Plus it will email you when I actually fix the problem. :)


As for the other problem, nope, clear-goals would not solve it. The game tracks orders given and the goals of every ship separately.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Hyper Ion

  • 26
  • I'm insane. Deal with it.
Re: Using Specific Weapon on Specific Target Help Pwease?
I prematurely assigned the report and can't figure out how to modify/delete it.
« Last Edit: December 24, 2007, 01:39:33 pm by Hyper Ion »
"Your ignorance is my bliss... well, unless it affects me negatively."

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Using Specific Weapon on Specific Target Help Pwease?
No problem, I've grabbed it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]