Catapaults... Sorta :) (ie. Beta Catapults)

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
msc_catabeta_thumb.jpg
Click to enlarge

Alright, here's a tutorial map, on how to setup the new ms_npc "other/catapault" and script:

1) You will need the latest SC.DLL (released today) from the usual source

2) You will need the map (includes source):
http://www.thothie.com/ms/catapult_kindawork.zip

Soon, I suspect very soon, Lord K will get the kinks out of this thing, and we'll have a catapult that doesn't require the feild of env_explosions I've put in here.

So, notes on this map:
- Basically this is a 'catapult' (represented by skull pyramid) - firing at some happless Helena npcs (it can of course shoot anything - but this the most entertaining)

- The catapult boulders do not function quite right ATM - seems they have no radius. Basically, they must make a perfectly direct hit to do any damage. (And then they do 1k hp)

- So, to compensate, I have a feild of random env_explosions. Problem with these is, the MSC engine doesn't view damage quite right - so the worse they'll do to you is knock you down until you recover 1hp - at which point you can duck, and run away again. They will, however, slaughter NPC's just fine.

- The blue ramp is provided so you can get directly on the catapult emitter and see how the damage works when it functions correctly - just jump up and down on it.

- The catapult fires in a 30 degree arc of the ms_npc's angle, with a range of around 1250-1500 units distance

- Breaking the little brown pyramid puts an end to the catapults firing. (It only has 20hp - but could be set to anything and/or replaced by anything)

Here's the important entities (the rest are superfluous to the task):

Code:
{
"classname" "ms_npc"
"targetname" "cata"
"scriptfile" "other/catapault"
"angles" "0 90 0"
"spawnchance" "100"
"delayhigh" "2"
"delaylow" "1"
"origin" "1 -384 -224"
}
{
"classname" "ms_npcscript"
"targetname" "openfire"
"eventname" "FiveBalls"
"target" "cata"
"firedelay" "1"
"type" "2"
"origin" "1 -384 -224"
}
{
"classname" "multi_manager"
"targetname" "cataloop"
"spawnflags" "1"
"openfire" "10"
"explosions" "13"
"cataloop" "14"
"origin" "-0 -255 -288"
}

For the field of explosions, I've got a bunch of pairings like these scattered about with varied delays:

Code:
{
"classname" "env_explosion"
"targetname" "exp_a"
"spawnflags" "34"
"iMagnitude" "100"
"origin" "1 -2303 -384"
}
{
"classname" "mstrig_relay"
"targetname" "explosions"
"target" "exp_a"
"spawnflags" "34"
"delay" "1.25"
"random" "50"
"origin" "1 -2304 -320"
}

These will, hopefully, be not needed just as soon as the catapult comes out of beta stage, and works properly. Still, the effect is kind of neat, and the env_explosion has a no-damage flag option - so you might still want use these even then.

Note: you can use "eventname" "OneBalls" on the ms_npscscript to fire one boulder per trigger, instead of five.

PS. This is just a sample test map - but boy is it fun to watch the slaughter! :twisted:

Ewok: Take note how one inverse linear light illuminates this whole damned map. :p
 

JabbahRulz

New Adventurer
Christian Warrior's of God
Joined
Oct 15, 2004
Messages
162
Reaction score
0
Age
32
Location
Death City
STOLE MY IDEA OF TREBUCHETS (yes they are sort of same thing) BAN BAN BAN BAN BAN!

the idea looks nice, anyone going to try it?
 

HomestarR

New Adventurer
Blades of Urdual
Joined
Aug 11, 2004
Messages
845
Reaction score
0
Age
38
Location
Knee deep in shit
They really arent that similar. That is like comparing a Turtle to an Alligator "They are both green and swim!111"

I am sure that will be great fun once impleminted.
 
  • Thread starter
  • Admin
  • #7

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
They are both large wooden siege devices that throw heavy objects long distances.

More like alligator vs. crocodile. ;) (See also: said funny-ars link)

As for the light, set the ZHLT Falloff from Default to Inverse Linear (Could probably cover all the outdoors of thornlands with 2 of em). That would involve recompile though... My "freezetime" and event ideas (that I'm so bitter about having ignored, hence the comment) would not require recompile, and could be used to prevent things like the sun rising and falling in underground maps, underground rain, and well - all that sort of annoyance in this stupid stone box. ;)

I also can't do my current map idea without the "freezetime" idea, as it's entirely indoors - and if you think it looks silly when it rains in a cave... Hence my whiney bitterness.

PS. the ms_npcscript entity is not in the current MSC.FGD - you can add it by editing the FGD and sticking on the following:
Code:
@PointClass base(named) = ms_npcscript : "NPC Script"
[
	target(string) : "Monster Name"
	type(choices) : "Type" : 0 = 
	[
		0 : "Move"
		1 : "Play Anim"
		2 : "Run Script Event"
		3 : "Move, then Play Anim"
		4 : "Move, then Run Script Event"
	]
	moveanim(string) : "Move Anim"
	actionanim(string) : "Action Anim"
	eventname(string) : "Script Event"
	firewhendone(string) : "Fire, when finished"
	firedelay(string) : "Fire Delay" : "0"
	stopai(choices) : "Disable Monster AI" : 0 = 
	[
		0 : "No"
		1 : "Yes"
	]
Should be needless to say, backup your FGD first.
 
  • Thread starter
  • Admin
  • #9

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Like so many neat entities, it is sadly a Spirit of Half-Life entity. One of many reasons I keep begging the devs to add it.

Sometimes you can simulate fog in an area by overlapping huge fog sprites, but the effect isn't nearly as good, nor as convenient and FPS friendly, as Spirit's env_fog.
 

ceriux

Adventurer
Joined
Feb 17, 2005
Messages
2,297
Reaction score
5
Age
36
Location
At my computer :)
could u just bring the view-distance really close? i know u can change that in the map editor...
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
It does, in their defense, involve coding work... And they already have their work cut out for them already in that department.

I also suspect there's still some reluctants on some of the team's behalf to spend time making third party development easier, and thus a stronger force. I still think, very often, more dynamic entities > scripts though - even if we get access to the system (not always, but often enough).
 
Top