Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Admiral Edivad on July 17, 2007, 05:45:48 am
-
As the title suggests, i have a problem using the weapon-create sexp
This is the sexp description:
weapon-create
Creates a new weapon
Takes 5 to 10 arguments...
1: Name of parent ship (or "<none>" for no parent)
2: Class of new weapon
3: X position
4: Y position
5: Z position
6: Pitch (optional)
7: Bank (optional)
8: Heading (optional)
9: Targeted ship (optional)
10: Targeted subsystem (optional)
All fine with numbers 1 to 9; however, FRED reports an error if i add as 10th entry (Targeted subsystem) a turret. The error is "invalid subsystem name".
For example: that's what i put in the entries of my sexp
1. Leo 1 (bomber)
2. Assassin
........
9. GTI Vajont (Arcas class station)
10. turret19
FRED considers "invalid subsystem name" the entry "turret19"
is this an already known fred bug? might the problem be related only to my computer?
(i opened also the Procyon Insurgency mission "PI17a": FRED returns the same error with the Saturn's turrets)
Thanks.
-
When does the bug occur? There's no call to display that error message anywhere in the SEXP.
-
The error window appears every time i open the mission using FRED, when i save it, when i press the "error checker" key and when i paly the mission in the game.
That's the exact content of the window: (vajont is an Arcas station, Leo 1, 2, 3 are Artemis class bombers)
---------------------------
Error
---------------------------
Error in mission event "Bombs": Invalid subsystem name
In sexpression: ( when
( is-destroyed-delay 2 "Delta 1" )
( send-message-list
"Vajont"
"High"
"b3"
500
)
( weapon-create
"Leo 1"
"Assassin"
( get-object-x "Leo 1" )
( get-object-y "Leo 1" )
( get-object-z "Leo 1" )
0
0
4
"Vajont"
"turret19"
)
( weapon-create
"Leo 1"
"Assassin"
( get-object-x "Leo 1" )
( get-object-y "Leo 1" )
( get-object-z "Leo 1" )
0
0
4
"Vajont"
"turret19"
)
( weapon-create
"Leo 2"
"Assassin"
( get-object-x "Leo 2" )
( get-object-y "Leo 2" )
( get-object-z "Leo 2" )
0
0
4
"Vajont"
"turret19"
)
( weapon-create
"Leo 2"
"Assassin"
( get-object-x "Leo 2" )
( get-object-y "Leo 2" )
( get-object-z "Leo 2" )
0
0
4
"Vajont"
"turret19"
)
( weapon-create
"Leo 3"
"Assassin"
( get-object-x "Leo 3" )
( get-object-y "Leo 3" )
( get-object-z "Leo 3" )
0
0
4
"Vajont"
"turret19"
)
( weapon-create
"Leo 3"
"Assassin"
( get-object-x "Leo 3" )
( get-object-y "Leo 3" )
( get-object-z "Leo 3" )
0
0
4
"Vajont"
"turret19"
)
)
(Error appears to be: turret19)
Well, IMO the message should appear if i had put a non-existant subsystem name. However, i'm sure "turret19" is a subsystem of an Arcas station. Maybe the Sexp does not work with beams and turrets and works only with subsystems like "comm", "weapons",....
-
Maybe the Sexp does not work with beams and turrets and works only with subsystems like "comm", "weapons",....
Prolly. Methinks that sexp needs a new OPF_ parameter type.
-
(i opened also the Procyon Insurgency mission "PI17a": FRED returns the same error with the Saturn's turrets)
It loads up fine for me. It may depend on which of FRED2 version you're using. Mine seems to be dated 2/12/07, which was after 3.6.9.
This mission does not actually use any subsystem name for weapon-create though. I put an invisible dummy ship behind the hull at the right location instead of specifying a subsystem.
-
Methinks that sexp needs a new OPF_ parameter type.
what does this mean??? :confused: what do i have to do to solve my problem?
It loads up fine for me. It may depend on which of FRED2 version you're using. Mine seems to be dated 2/12/07, which was after 3.6.9.
This mission does not actually use any subsystem name for weapon-create though. I put an invisible dummy ship behind the hull at the right location instead of specifying a subsystem.
I checked that mission again and noticed that the problem was dued only to some wrong fred settings. I also noticed the invisible ship, very clever idea!!! but how did you manage to find the exact position for her? i did something similar in a cutscene with visible ships, and i think i've tested the mission for a hundred times....
-
I had another FRED2 window open at the same time, positioned everything in there and just copied out the coordinates. In my case, this was more convenient than having it target a subsystem, since the subsystem locations are important (to get around a bug in the model, actually) and I didn't want to move any of them around to the right spot.