Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BehemothProgrammer

Pages: 1 2 [3] 4 5 ... 23
21
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 13, 2019, 04:54:56 PM »
yup that's what will happen. Just have to declare a kActor@ named instigator before $restart in that example.

22
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 12, 2019, 08:17:40 PM »
I just checked it again, and yes it looks like kSelectionListFloat is exactly the same as kSelectionListInt. :o And int& Select(const bool = false) has a bool parameter.

Some more info on map scripts. $restart remaps to
Code: [Select]
void Game.CallDelayedMapScript(const int scriptID, kActor @instigator, const float delay)
where scriptID is taken from the last $script <id> value used in the script before $restart. instigator is placed in the instigator actor arg and the delay is 0. So it's calling itself and will execute itself on the next script execution cycle (not immediately). You can do this same thing and call CallDelayedMapScript(const kStr &in funcName, kActor @instigator, const float delay) for your custom map functions in order to loop them.

23
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 11, 2019, 05:28:18 PM »
Yeah lol you don't have to worry about that. What's weird about this game is that actors with the same type like -1, can still be spawned by it's name, and you can still access it's correct Definition. But the editor uses the type instead of the name, so if you're only using actors to spawn at runtime you can set all their types to -1. But yeah I usually just reserve 1000 ids for my mod and I know I'll never go beyond that.

24
Other Games / Re: 3D Realms/ Interceptor/ Slipgate Studios
« on: March 11, 2019, 05:02:09 PM »
Nice I was recently just playing some Quake 1 mods again. All these old devs who made great mid to late 90s fps games are coming back with more fps games in old updated engines, it's awesome. You can tell games like these are going to be made with passion from every member of the team.

25
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 10, 2019, 05:36:21 PM »
So to answer my own question, if you wanted to get a handle to the dummy actor's script object, it'd have to be declared shared.  But if it's shared, then it wouldn't be able to interact with any non-shared entities.  So you use InteractActorsAtPosition() to interact with non-shared entities in the game module from the level module.
Right you got it.

Quote
This may be naiive, but then why not just redeclare everything shared?  You wouldn't be able to access global variables, but those could be changed to member variables in a shared class.
You could, but I don't think you really want to modify all of the game scripts for that and not be able to use global variables, funcdefs, and whatever other types it doesn't support. I wouldn't do that. You shouldn't need to communicate with the ScriptObjects directly very much or not at all from the map scripts. In the rare event you want to do more you can use that helper function, but you might want to ask yourself if what your trying to do could be done in the actors script itself.

For instance if your trying to change the water height in a special way. Then maybe you want to make an actor that handles that and changes the water height when it gets triggered some way. In the map editor you can setup the actor with all the data it needs to know what to do with those SpawnParams, and also if you don't need them for collision, you can use: Radius,Height, WallHeight, and StepHeight. And the 3 spawn flags, are all accessible. Then when the actor is triggered it'll change the water how you want it. You should try to break down all the special things you want to do in your map to generalized actors that can handle everything you want to do with a simple OnActivate call from an event trigger.

It's one of the things I did in my last map was making all those kinds of actors that I needed. An actor that spawns items in any way I want, A counter actor that increases a number and triggers an actor/script when it reaches a certain value, An FxSpawner, An EventLink for handling trigger conditions to actors/scripts, HUD Messages, Playing sounds, modifying anything about a sector/area, a collision trigger area that triggers actor/scripts when you touch it, etc... Then you start to see that you really don't even have to do any scripting in the map, but in some situations you might and that's where it can come in handy.

26
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 09, 2019, 02:02:25 PM »
That works because QuakeSource is a shared class. https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script_shared.html

Quote
Shared entities have a restriction in that they cannot access non-shared entities because the non-shared entities are exclusive to the script module in which they were compiled.

And that's not going to work when trying to get non shared classes from the game default scripts. And also it says there that you can share funcdefs which is wrong, or the angelscript version used in the game is really old. So casting to a non shared class compiled from another module will always return null. The only way to do custom things with non shared scripts is with that helper function that's able to call a function on an actor to the game module with 4 floats that can do whatever.

In this game there are 2 modules for scripting, I'll call them the game module and the map module. https://www.angelcode.com/angelscript/sdk/docs/manual/doc_module.html

27
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« on: March 09, 2019, 01:24:54 AM »
Nice work listing all the attacks for all the enemies. That was something annoying I never wanted to do, but needed to lol. You pretty much got everything listed that's awesome.

Your mentioning InteractActorsAtPosition and I just wanted to show a helper function I used for calling functions from the map module to an actor in the game module, that uses InteractActorsAtPosition. This function will spawn a special actor type at the players position and set it to solid so InteractActorsAtPosition will call it. You only want the function to be called on the actor once instead of for every solid actor in range so you need to do a condition check for that actor type at the start of your function.

Code: [Select]
//------------------------------------------------------------------------------------------------------------------------
// Useful to call custom functions from the map script module to the game script module.
// Otherwise just use the ScriptObject's ScriptObject() function to get a handle to it.
//
// Required:
// Function header: void funcName(kActor @actor, const float arg1, const float arg2, const float arg3, const float arg4)
// Function body condition check: if (actor.Type() != BP_AT_FUNCTIONCALL) return;
//------------------------------------------------------------------------------------------------------------------------
void CallFunc(kActor@ actor, const kStr &in funcName, const float arg1 = 0.0f, const float arg2 = 0.0f, const float arg3 = 0.0f, const float arg4 = 0.0f)
{
kActor@ playerActor = Player.Actor().CastToActor();
kActor@ dummy = Spawn(BP_AT_FUNCTIONCALL, playerActor.Origin(), 0.0f, playerActor.SectorIndex());
dummy.Flags() |= AF_SOLID;
actor.InteractActorsAtPosition(playerActor.Origin(), funcName, arg1, arg2, arg3, arg4);
dummy.Remove();
}

and going the other way from game to map module is easy with the Game.CallDelayedMapScript function.

Here's the last of my random stuff I found out when making my last map that I don't think you have in the guide, hope it helps.
https://pastebin.com/raw/fExJrV1j

28
Turok 2 Seeds of Evil Modding/Mapping / Re: Behemoth's Random Mods
« on: March 08, 2019, 10:09:07 PM »
Some more random mods I never uploaded.

NameDescription     Link
-------------------------
Stay DeadEnemies will not respawnDownload
Less BloodDownload
No Blood With GibsDownload

29
Turok Dinosaur Hunter Modding/Mapping / Play Turok Backwards
« on: February 07, 2019, 05:05:42 PM »

Play Turok backwards. Start from the end and finish at the beginning.

Select "Start Normal Game" to play.

Playing on Hardcore begins with only the default weapons. Are you up for that challenge?

(Also I completed the gallery map that was in the game for the end.)

https://steamcommunity.com/sharedfiles/filedetails/?id=1647472022

30
Turok General Discussion / Re: Lost Land Map Project
« on: February 07, 2019, 04:40:49 PM »
Looks awesome for fitting all the custom maps in. Funny the MOTS maps just keep going up.

Pages: 1 2 [3] 4 5 ... 23
SimplePortal 2.3.6 © 2008-2014, SimplePortal