Add ammo and Health


(Kynval) #41

i cheak it…
origin must be:

698 -1698 17 : -89
but where add it?
i’m leaving on weekend so… i will try on monday


(phisherman) #42

I’m trying to learn this stuff too, and I have a question:
Look at the first part of valkyr’s Explanation Post.

What are the “mins” and “maxs” for? What do I need them for? How do I get those origins?


(Kynval) #43

mins and max is how far i can take ammo and hp…

quickly i think about “angle”


(Qualmi) #44

why not -89.48231845828138213821382183 !!!

sry i couldnt resist :>


(valkyr) #45

Yeah - those determine the size of the trigger_'s. The origin is at the bottom (base) centre of an entity, so once you place the cabinet and trigger_'s with an origin you then work out how far in each direction the trigger will cover.


	origin "-28 2596 96"
	mins "-27 -25 0"
	maxs "27 0 64"

So for this cabinet, the trigger covers the area from : -55 2571 96 to -1 2596 160


(phisherman) #46

So I have to find out the mins and max-origins for every single HNAC??
Why isnt it possible to enter the range of the cabinet, which would be always the same? This is really shitty like it seems to work. ( Or have I just misunderstood it? )


(valkyr) #47

Those last numbers were just to show how the mins and maxs works - you don’t actually need them.

The size of the range will always be the same, but the X and Y depends on the angle.

So you could have


	mins "-27 0 0"
	maxs "27 25 64"

or


	mins "-25 -27 0"
	maxs "0 27 64"

Both of those are the same size - 54x25x64 / 25x54x64


(phisherman) #48

[QUOTE=valkyr;201065]Both of those are the same size - 54x25x64 / 25x54x64[/QUOTE]So those Coordinates would work with every HNAC on every map?
Or do I need new coordinates/origins for every HNAC?


(valkyr) #49

Well, almost - those mins and maxs were from the previous scripts in the thread, and the cabinets were all against walls, so the trigger only covers the front half of the cabinet. If you had a cabinet that was accessible from the other side you’d need to change for example :


	mins "-27 0 0"
	maxs "27 25 64"

to


	mins "-27 -25 0"
	maxs "27 25 64"

(the Y co-ordinate on that trigger was from the front of cabinet to the back)


(phisherman) #50

So I can use those mins and may for every HNAC, right? Thats not a problem that the HNAC is only accesible from one side, because I’ll always put them against a wall. So I can use those origins for every HNAC I’m gonna create?


(valkyr) #51

Like I said, it depends on the angle of the cabinet.

If the cabinet’s running parallel width-wise (left to right) along the X-axis it would either be :


	mins "-27 0 0"
	maxs "27 25 64"

or


	mins "-27 -25 0"
	maxs "27 0 64"

If it was running parallel to the Y-axis it would either be


	mins "0 -27 0"
	maxs "25 27 64"

or


	mins "-25 -27 0"
	maxs "0 27 64"

It basically just has to be 27 units from the centre of the cabinet to the left and right edges, 25 units from the centre to the front, and 64 units high.


(valkyr) #52

Actually you probably could simplify it and always make it


	mins "-27 -27 0"
	maxs "27 27 64"

The only situation that wouldn’t work in was if the cabinet was against a really thin wall which you can get to the other side of - the trigger might then be accessible from the other side of the wall.


(phisherman) #53

I think this will not happen, such thin walls are very rare.[QUOTE=valkyr;201093]Actually you probably could simplify it and always make it


	mins "-27 -27 0"
	maxs "27 27 64"

[/quote]So this would work with every HNAC, with every Angle? Or what do I have to change, if the Angle is 90, 180 or 270?


(valkyr) #54

Yes, it should do.


(phisherman) #55

Ok, thank you very much. :slight_smile:

//I got another question: What is ammorate and ammototal for? And what are recommended values for it?


(UJERebel) #56

[QUOTE=Phishermans Phriend;201140]
//I got another question: What is ammorate and ammototal for? And what are recommended values for it?[/QUOTE]

http://games.chruker.dk/enemy_territory/entities.php?action=show_entity&entity_name=trigger_ammo


(phisherman) #57

Danke sehr. :slight_smile:


(Kynval) #58

i changed angle and is OK…


(phisherman) #59

Ok, and after we all know how to include HNACS now, can you help me with including MG42s?

I included one, but when I load the map, I cant use it. The useable-hint is shown, but when i hit F, nothing happens. This is the script, can somebody please tell me whats wrong with it?

create
{
classname “misc_mg42”
scriptname “main_gate_mg42”
origin “3576 1352 32”
spawnflags “2”
}


(Wezelkrozum) #60

MG42’s doesn’t have scriptnames but targetnames. But I don’t know if it solves the problem.