Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
e4mafia

Registered:
Posts: 37
Reply with quote  #1 
Is this possible to do without manually doing a check against every scripted object on the map?
I'm working on creating a script for hacking enemy vessels, creating several stages of getting in, then affecting some enemy system, while randomly in the background we're checking to see if the enemy notices being hacked and kicks the players out. This will be managed by the comms officer. 

But the key is I need to be able to affect whatever vessel they want, via selecting. The If selected requires a specific object name, doesn't it? I can't seem to find a way to do it otherwise, without writing out options for every single enemy on the map.

Any ideas? I'll be looking through other mission scripts to see if someone has already figured this out.

There seems to be the equivalent for this for what the GM has selected, but not the players.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,049
Reply with quote  #2 
I am pretty sure the answer is yes, you need specific object names for IF SELECTED or IF PLAY IS TARGETING. You need object names for a lot of things in the mission scripting system.

Only the Game Master console has the ability to select an arbitrary object, including an unnamed object. You might consider writing a special script in which the GM console acts as an auxiliary Science console. But the common solution is to join the rest of us and write ten thousand lines of code to check every possible object.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
e4mafia

Registered:
Posts: 37
Reply with quote  #3 
Mike, your answer is simultaneously depressing and hysterical. Your GM station idea is actually pretty interesting. Perhaps an Electronics warfare Station? I think I'm gonna give that a try. Or as you said - 2 screens for the comms officer - communications and electronic warfare. I kinda like it. Makes combining that with a GMed mission un-possible, but could be a nice compromise. 

I guess could always just make it an interactive thing that requires GM intervention too....things to think on.
Thanks for the quick reply


ryleyra

Registered:
Posts: 2,846
Reply with quote  #4 
Xavier Wise has come up with a clever algorithm using Expression Evaluation that takes a standard naming convention, such as "X32" and loops through all possibilities until it finds the one needed by the script. It would work fine determining which ship Weapons is targeting. Xavier's post is here: https://artemis.forumchitchat.com/post/destroy-all-randomly-named-ships-problem-solved-8572294?pid=1300126504
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.