Adding limit time for completing the game

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

Yep, how to do it? I mean the timer spawn in top SRS and will ticking down into zero, so when it run out, the game is over.
I planning to create the adventure extension that only ONE system. And I'm little confused when meet the system map, should I leave them empty or fill it?
One last thing, can I change the startingPos from Start to Random?
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
User avatar
TheLoneWolf
Militia Captain
Militia Captain
Posts: 802
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

You gave me a pretty interesting idea.

A Time run meets survival mode!

Kill ships to keep your time up. Your equipment upgrades according to score.

Or maybe using a counter.
If counter reaches full, you die instead of overheat :D
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

Almost like that, but not killing for the extra times (but I dunno that I will apply it). Also, there is no station in game, just enemy ship. So you can't install device safely. However you can install all vanilla weapon drop from strongbox by use it. And every time you install high level device, enemy will try to balance the game and have device that same level with yours.
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

This should be possible with overlays. You can add an overlay to an object (probably the player ship) with (objAddOverlay obj overlayType pos rotation [lifetime]). Unfortunately, I don't think you can get the screen size in TLisp, so if you make the position too far away from the player ship, it could be off screen when playing at a lower resolution.

Here's an example of a progress bar overlay from Eternity Port:

Code: Select all

<OverlayType UNID="&ovOverloadHack;"
			>
		<Counter style=	"progress"
				label=	"hacking"
				max=	"100"
				/>
		
		<Events>
			<OnUpdate>
				(block (
					(hackerObj (objGetObjByID (objGetOverlayData gSource aOverlayID 'hackerID)))
					(startHack (objGetOverlayData gSource aOverlayID 'startHack))
					(maxRange (objGetOverlayData gSource aOverlayID 'maxRange))
					(ticksToHack (objGetOverlayData gSource aOverlayID 'ticksToHack))
					(hackTime (subtract (unvGetTick) startHack))
					(percentDone (if (gr ticksToHack 0) (divide (multiply hackTime 100) ticksToHack) 0))
					)
					
					(switch
						;	If the hacker is dead, then we're done
						
						(not hackerObj)
							(objRemoveOverlay gSource aOverlayID)
							
						;	If we've drifted out of range, then we lose the connection.
						
						(gr (objGetDistance gSource hackerObj) maxRange)
							(block Nil
								(objSendMessage hackerObj Nil (typTranslate &itCDMShard; "overloadHack:ConnectionLost"))
								(objRemoveOverlay gSource aOverlayID)
								)
								
						;	If we're done hacking, then the ship blows up
						
						(geq hackTime ticksToHack)
							(block Nil
								(objSendMessage hackerObj Nil (typTranslate &itCDMShard; "overloadHack:Success"))
								(objDestroy gSource hackerObj)
								)
								
						;	After 120 ticks we're just hacking
						
						(geq hackTime 120)
							(block Nil
								(objSetOverlayProperty gSource aOverlayID 'counter percentDone)
								(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &itCDMShard; "overloadHack:HackingReactor"))
								)
								
						;	After 60 ticks we're uploading our payload
						
						(geq hackTime 60)
							(block Nil
								(objSetOverlayProperty gSource aOverlayID 'counter percentDone)
								(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &itCDMShard; "overloadHack:UploadingPayload"))
								)
								
						;	We're penetrating the firewall
						
						(block Nil
							(objSetOverlayProperty gSource aOverlayID 'counter percentDone)
							(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &itCDMShard; "overloadHack:BreakingFirewall"))
							)
						)
					)
			</OnUpdate>
		</Events>
	</OverlayType>
You could change the OnUpdate code so it starts full, decreases over time, and destroys the player when it runs out.
Post Reply