www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Next Generation Level Editor

Reply
 
Thread Tools
Old 19-07-17, 09:42   #271
Baddy82
Student
 
Baddy82's Avatar
 
Join Date: Aug 2015
Location: germany
Posts: 133
Default

Quote:
Originally Posted by Caesum View Post
^ If you don't have an answer, don't talk at all Dan.

Baddy82 - This is indeed the wrong place to ask though. This thread is for DLL plugins that are made by TRNG users. You would want to ask that question in the Open TRNG Chat which is right below this thread actually.

About your question, no I don't think Windows 10 could actually cause that. In my opinion it must be something on the user side. What keyboard keys must be pressed in order to make a crawlspace roll? Maybe that player has a keyboard that doesn't allow this particular set of keys to be pressed at the same time. Same thing happens on some keyboards if you use left directional key + up + sprint.
thanks, yes, I was thinking that, too..
interesting with the keyboard..
__________________
Lara says " NO".
Baddy82 is offline   Reply With Quote
Old 02-08-17, 06:36   #272
JMN
Hobbyist
 
Join Date: Sep 2006
Location: South Africa
Posts: 79
Default

Which callback should one use to draw a object/mesh/text on screen while the game is running, i.e. not in inventory or pause screen?

I've tried the CB_PROGR_ACTION_DRAW_MINE, but nothing happens. Putting in some dummy code like moving Lara forward does work so the function is being called, it's just DrawObject2D() that's not doing anything. It does work though when using CB_INVENT_BACKGROUND_DRAW.
JMN is offline   Reply With Quote
Old 04-08-17, 13:16   #273
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

^
Did you try this?
AkyV is offline   Reply With Quote
Old 10-09-17, 12:54   #274
AODfan
Archaeologist
 
AODfan's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 1,464
Default

Not sure where to put this but since I'm using a custom trigger I thought it would be best to post it here.

TRNG version 1.3 broke the old sound engine (the old sound engine only has one channel instead of 2), it's been partially fixed in an update but it still leads to random crashes.
I tried to script my way around it but it doesn't seem to work. The basic idea was to stop the audio on channel 1 when anything plays on channel 2 and then restore it once nothing plays on channel 2 anymore. It stops the audio on channel 1 like it's supposed to but I can't get it to restore it afterwards.

So first I'm saving the background track number so I can restore it later. I'm only using one background track per level so the GT is executed only once at the beginning of the level. The organizer is necessary so the execution is slightly delayed, otherwise it will save the background track as -1.

Code:
GlobalTrigger=		29, FGT_SINGLE_SHOT, GT_ALWAYS, IGNORE, IGNORE, 66, IGNORE ; Save background track
TriggerGroup=		66, $2000, 127, $5
Organizer=			5, IGNORE, IGNORE, 1, 72
TriggerGroup=		72, $2000, 277, $0, $2000, 272, $53
Next I have a GT that checks if something is playing on channel 2 and if that's true it will stop any audio playing on channel 1.

Code:
GlobalTrigger=		30, IGNORE, GT_CONDITION_GROUP, IGNORE, 67, 68, IGNORE
TriggerGroup=		67, $2000, 277, $1, $8000, 0, $2E
TriggerGroup=		68, $2000, 130, $0
The last GT checks if both channel 1 and channel 2 are empty and if that's the case it's supposed to restore the background audio.

Code:
GlobalTrigger=		31, IGNORE, GT_CONDITION_GROUP, IGNORE, 70, 71, IGNORE
TriggerGroup=		70, $2000, 277, $1, $8000, 0, $2F, $2000, 277, $0, $8000, 0, $2F
TriggerGroup=		71, $012000, 1, $0
The custom flipeffect contains the following code:
Code:
	case 1: // Restore Audio
		int RestoreAudioTrack;
		Get(enumGET.VARIABLES, 0, 0);
		RestoreAudioTrack = GET.Vars.pTrngVars->Locals.Name.Beta.Short2;
		PerformFlipeffect(NULL, 68, RestoreAudioTrack, 0);
		break;
In the game the background audio gets saved to Local Short Beta 2 like it's supposed to and the background track is stopped when you trigger a track on channel 2, so both the GTs work correctly. However, after the track on channel 2 is done playing, the background audio is not restored.
There must be something wrong with how I set up the last GT or with my new trigger. When I place the new trigger in my level and step on it, it gives me an error message that it can't find audio track 000. Local Short Beta 2 is definitely 57 at that point so I'm not sure why it's trying to play track 0 instead of track 57.
If I put F68 in TG71 instead, nothing happens either, so maybe both my GT and my new trigger aren't working?

This turned out to be quite a long post but I hope someone can help me solve this issue
AODfan is offline   Reply With Quote
Old 10-09-17, 22:25   #275
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

http://www.trlevelmanager.eu/plugin_...collection.htm

Quote:
Note: the call to set data in GET.Vars:
Get(enumGET.VARIABLES,0,0);
It could be executed only once, in cbInitLevel() function, and it will grant to have valid values in GET.Vars structure in all following elaborations, from other functions.
Perhaps is it?
AkyV is offline   Reply With Quote
Old 11-09-17, 20:00   #276
AODfan
Archaeologist
 
AODfan's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 1,464
Default

That wasn't it.
It seems like the audio track doesn't go back to -1 once it's done playing but it stays as the last audio track that plays, so maybe that's why nothing happens. I check if channel 2 is set to -1 but it never actually goes back to that value
AODfan is offline   Reply With Quote
Old 11-09-17, 20:40   #277
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

Quote:
Originally Posted by AODfan View Post
That wasn't it.
It seems like the audio track doesn't go back to -1 once it's done playing but it stays as the last audio track that plays, so maybe that's why nothing happens. I check if channel 2 is set to -1 but it never actually goes back to that value
That is right, I have already tested it, that memory zone field is -1 only:

- before playing any audio on that channel, or
- if you stop the audio on that channel with a "stop" trigger.

I have a bit complicated condition code in my plugin, that checks if 0, 1... 254, 255, any/none audio is just playing on any/none/channel1/channel2.
Paolone once explained how to check this.
(I am still waiting for Paolone to fix a serious bug that prevents me from sending the plugin to the tests... - Speaking of, what's with the rollingball? )
AkyV is offline   Reply With Quote
Old 12-09-17, 11:53   #278
AODfan
Archaeologist
 
AODfan's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 1,464
Default

Just as I thought. I guess I can't cheat my way around this bug
Hopefully the next update fixes it so I don't have to create weird workarounds.

I was completely focused on the Lara Fix project but now that that's out of the way I'm gonna focus on the rollingball plugin
AODfan is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 21:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.