Jump to content

Icarus scripting in multiplayer


afi

Recommended Posts

Scripting npcs to walk a path through waypoints while performing animations/holding them (think of the Atlantica map if you have seen it).
I recently added a tiny bit of Icarus Scripting to our entity modded MP/Duel6 which is in the normal rotation on our {JoF}Public server. If you ever see it on, you might wanna visit.

We have an npc sitting down in a chair indefinitely.
We have an npc patrolling an area with his hands in amatease-ish position a lá Luke Skywalker.
We have two npcs sparring/fighting, turning off their saber, talking to each other, and repeating this process indefinitely.

ooeJack, NAB622 and z3filus like this
Link to comment

Weird, I don't remember that map at all.....and yet I'm glowingly credited in the readme. I might have to give that a look.

Edit: Just loaded up Malevolence, I still don't remember it at all but it's really cool. Not to downplay it, but that's some pretty basic scripting stuff overall. Most of it is pretty easy once you know what you're doing.

Scripting in MP is HIGHLY limited compared to SP, yes, but there is still a lot you can do with it. Is there something in particular you're looking to do? For starters, brush entities can be moved to arbitrary locations, and basic logic is possible, as well as putting data on players.

At one point, I had a working prototype of a cutscene "Engine", so to speak, where all players would be made invisible, and snapped to a specific place in the skybox to watch an animation play. Never did use it for anything useful, though. Too many bugs in the base game to make it polished and properly functional.

Circa likes this
Link to comment

I don't know anything about battle royale (Haven't played a game in like 14 years now), but brushes moving on a timer is VERY easy, and teleporting players is also possible, but with some limitations. It is also possible to activate and deactivate triggers at will, so that might do what you want.

IIRC, the only downside to moving brushes is that things like corpses will block them, even if they are set to crush (Just for a moment, but enough to break some things). So if you were planning on making a specific area shrink, it may be a bit trickier than it looks, but it can still be done with some clever brushwork.

Link to comment

Restricting the playable area is very possible, and honestly, relatively easy.

Scripts can be triggered by many things - map load, a trigger, a target_scriptrunner, an NPC, and much more.

If you're interested in another good example of what scripts can do - check this map out (Be sure to run it in duel mode). It chooses a random area on startup to restrict the players to. But in FFA mode, it leaves the entire map open to be explored.

https://jkhub.org/files/file/1448-nar-shaddaa-landing-zone-17/

Since it was a group project from map-craft years ago, the source files should all be in there with it. If not, let me know and I can dig them up.

Edited by NAB622
Speling and clarity
Link to comment

There is a WAIT command in Icarus that you can use to delay the rest of the script, for example, WAIT(540000) delays the rest of the script coming after the command by 9 minutes (540000 milliseconds). Otherwise, you can add a delay to pretty much everything in GTK Radiant.

NAB622 likes this
Link to comment

Icarus can run its own timer as the game runs, and thus simulate a time, although with only mediocre accuracy.

What kind of player info are we talking about? Player names are definitely out of the question, but score is easily available. I can think of some really advanced techniques that can also find the highest score, the player with the highest score, and a faux location for said player as well, although not without a few caveats. But that's reeeeally advanced stuff, like, takes-a-whole-week-to-get-right stuff. Whereas the things in the previous posts take minutes to do.

Link to comment

Teleporting specific players through a script must be done with a trigger, a target_scriptrunner and a target_teleport. Since a script can fire off a targetname, you just need to have the player fire off the targetname of the target_teleport. To have the script running on the player, though, will require a target_scriptrunner with the "RunOnActivator" flag, and a trigger to fire it.

If you're just talking about teleporting multiple players in an area and not a specific player, you can just activate a trigger_teleport or a trigger_multiple that encompasses a specific area instead.

Teamscore and individual score should be possible to get, but the only method i can think of at this moment involves a polling system and a lot of work. I think health is freely accessible....(I know it can be set, i just don't know if it can be gotten).

Link to comment

If you can mock up some rough MSPaint drawings of what you're doing, it might help us point you in the best direction.

Keep in mind that, if it helps, you can have multiple brushes as part of a single trigger, all in separate areas of the map.

Link to comment

It's actually quite simple on the paper. I want that, for example on ffa3 people can just play normal ffa/tdm and after a certain time (for example 9 minutes), everyone ingame will be teleported to a new location, for example the bar in ffa3.

Link to comment

Ohhh, okay. Yeah, that should be pretty easy to do, if you intend it to involve all players. 

With some advanced techniques, you can make it so players can choose whether to participate or not - so some people can play a casual FFA chatroom, while others play a TFFA match in a secluded area. But that would be some pretty involved stuff. It would require overriding the spawn system for players, and I'm not sure it could tabulate total team scores reliably. Something for me to think about...

Edited by NAB622
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...