Is it possible to determine the owner of any given missile?

Freeform discussion about anything related to modding Transcendence.
Post Reply
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

For example, use (enum (sysFindObject ...) thisObj ...) to determine which beams and missiles among a list are mine and which are not, then do something to those missiles that are not mine.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1215
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 I’m not sure about the specific owner of a beam/missile, but a quick test shows that I can at least get their sovereigns. Depending on how you’re wanting to use it — such as something only the playership would have, or something where it makes sense not to have the item in question affecting beams/missiles from the same sovereign — might that be enough to do the trick?
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

I need to know the specific owner of any given missile object for what I want to do. Detection shortcuts like sovereign or player-only will not work.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Easy with the help of a virtual station and <OnSystemWeaponFire>:

Code: Select all

<OnSystemWeaponFire>
	<!-- 
	
	Populated variables:
	
	aWeaponObj: is the object that fired the weapon.
	aWeaponUNID: is the UNID of the weapon being fired.
	aWeaponPos: is the position where the shot originated.
	
	-->
	
	(block (aShot)
		(setq aShot (sysFindObject aWeaponPos "mb NN:1"))
		(objSetData aShot "owner" aWeaponObj)
	)
</OnSystemWeaponFire>
The key idea is to tag each shot with its owner spaceObj as soon as it's fired. I know you know how to implement the rest.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

Ah, yes, that trick. I hoped I would not need to resort to virtual stations to force feed such data. Thanks, anyway.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

The data's available in the damage events so it may be in object properties if George will reveal the identifier. If it isn't it's something you can request that shouldn't be too hard to implement.
Literally is the new Figuratively
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

Unfortunately, when I want the data is not within an event where aAttacker is available. It is within a recurring event akin to OnBehavior.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Post Reply