Members | Sign In
All Forums > Mission Scripting
avatar

trouble with the targeting (1.55 script)

posted Dec 10, 2011 18:01:59 by DrTwitch
i was trying to get a lockon to work.
this is the script i was using (and RDN1 does exist and i can lock on it as an enemy.)
i hope that i am not missing something obvious...

<event>
<if_player_is_targeting name="RDN1" />
<if_variable name="RDN1Targeted" comparator ="!=" value = "1" />
<incoming_coms_text from ="RDN1" >
that is rather invasive^
</incoming_coms_text>
<set_variable name="RDN1Targeted" value ="1" />
</event>

[Last edited Dec 10, 2011 18:59:56]
---- ---- ----
here come the drums
page   1 2 next last
17 replies
avatar
Vorus said Dec 10, 2011 18:43:06
You're missing the "/" in your "if_variable" line. That's the only thing I see.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
DrTwitch said Dec 10, 2011 19:10:42
thanks and sorry to waste your time with a typo in my post.

The missing "/" is not missing in the mission script. I corrected the example I posted and verified that I indeed did have a properly formatted block.

the issue still remains (lockon fails to generate comms message).

(thanks for the idea to use xmlPad Pro - that keeps me from badly formatted XML at least.)
---- ---- ----
here come the drums
avatar
Vorus said Dec 10, 2011 19:52:26
Darn, I was hoping that was the problem. Oh! How about this, it should be spelled "incoming_comms_text", with two 'm's, your example only has one.

If that doesn't help, I'd suggest putting in a few <log text="something"/> in the script in a few places, and see which ones show up in the log and which ones don't.


Actually, it's Mike that uses XMLPadPro. I run Linux, so I use one of the built-in text editors. I really should look for something better though, because it doesn't catch things like missing slashes very easily.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
DrTwitch said Dec 10, 2011 21:57:59
OK finally got my machine opened up to the web again.
here is the actual script....

i added the send message to consoles, and write to log file.
the only think that i should be testing is the targeting option.
i have a direct command to RDN1 so i know that it is a valid object name (the little ship heads to the marker i set for it)

so i am sorta stumped, typos and stuff should be resolved so i am wondering if the targeting is not working.

<if_player_is_targeting name="RDN1"/>
<if_variable name="RDN1Targeted1" comparator="!=" value="1"/>
<log text="Targeting has happened" />
<warning_popup_message
message="Targeting has happened"
consoles="MHWESCO" />
<incoming_comms_text from="RDN1">
That is rather invasive^
</incoming_comms_text>
<set_variable name="RDN1Targeted1" value="1"/>
</event>
<event>
<!-- timer for 10 seconds to play a sound, send a note and make a note in the log -->
<if_timer_finished name="MakeASound_timer"/>
<if_variable name="RDN1Msg1" comparator="!=" value="1"/>
<log text="a messageto humon has happened" />
<warning_popup_message
message="a messageto humon has happened"
consoles="MHWESCO" />
<incoming_comms_text from="RDN1">
Just sending you a message humon!^
</incoming_comms_text>
<set_variable name="RDN1Msg1" value="1"/>
</event>
---- ---- ----
here come the drums
avatar
Vorus said Dec 10, 2011 22:13:18
Does the log show that the targeting worked? Does the pop-up message happen? I can't see anything wrong with your script. If the log shows nothing about targeting, I'd think it's probably an error earlier on in the script, if the log is showing the targeting working . . . then I don't have a clue, everything looks fine to me.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
DrTwitch said Dec 10, 2011 22:59:39
no targeting event is recorded, log/pop up.
I agree and think that the script is set up OK.

I would tend to interpret this as a new feature not working properly.

I am hoping that Thom may have an idea of what may be happening on this particular issue (i am running into trouble with some of the other new features and so i am guessing this may be the trouble)
---- ---- ----
here come the drums
avatar
Vorus said Dec 11, 2011 06:43:52
I tend to agree. I tried it myself, and I get the same results as you, the event is just ignored. No logging, no comms message, nothing. Darn. :(
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
5th_Wall_Gaming said Dec 11, 2011 07:47:44
Set in your start..

<set_variable name="RDN1Msg1" value="0"/>

Also, when you run the program, press F6 to see the variables. Does it exist?
http://www.5thWallGaming.com
We make dreams reality
avatar
ThomRobertson said Dec 11, 2011 19:25:48
Sorry, guys, you've found a bug. I've fixed it; it'll be available in the next version I release.
Creator of Artemis
avatar
Vorus said Dec 11, 2011 20:14:24
Yay! We aren't just terrible script-writers! :D
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
DrTwitch said Dec 12, 2011 03:30:02
Vorus said about 6 hours ago
Yay! We aren't just terrible script-writers! :D


speaking for myself, I probably am just a little terrible. ;)


Thom, is there a good way to pass bugs on to you, or is it better that we try and grapple with them (and replicate them) in the forums?

(Vorus and 5thWall I am glad you stuck with this to try and figure it out)
---- ---- ----
here come the drums
avatar
DrTwitch said Dec 12, 2011 03:32:36
5th_Wall_Gaming said about 19 hours ago
Set in your start..

<set_variable name="RDN1Msg1" value="0"/>

Also, when you run the program, press F6 to see the variables. Does it exist?


what is this F6 you speak of???? i couldn't make it work in the server or client consoles(simulation runnin). (the F6 on my keyboard right? are there other debug commands?

---- ---- ----
here come the drums
avatar
Vorus said Dec 12, 2011 03:43:18
I think it's F7, actually. It's REALLY useful, you can press it multiple times to see all your variables and timers. You press it when you have focus on the server.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
DrTwitch said Dec 12, 2011 03:53:10
F7...
ooooooooohhhh...
pretty.

(was this written up anywhere?)
---- ---- ----
here come the drums
avatar
Vorus said Dec 12, 2011 04:33:29
lol

I don't think it was written anywhere, actually. I just remember someone mentioning it once, and it's just stuck with me.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
Login below to reply: