plz helpl me 4 goldcrates problem :(


(psyco_mario) #1

Hello…
erm…this is my first post here and its quite a bigge.
here is my problem.
im making a map called waterfall_beta_1
and there are 4 gold crates behind water fall and a boat outside.
you have to take the goldcrates to the boat.
i coped the scripting from goldrush but which bit of the follwing do i change?

	trigger add_goldbar
	{
		accum 0 inc 1

		trigger gold_full_0 show
		trigger gold_trans_0 hide
		trigger gold_crate secured

		accum 0 abort_if_less_than 4

		trigger gold_full_1 show
		trigger gold_trans_1 hide

		trigger self truck_escape_msg

		wm_announce "Allied team is escaping with the Gold Crates!"

		wm_objective_status 4 0 2
		wm_objective_status 4 1 1

		wm_set_main_objective 5 0
		wm_set_main_objective 5 1

		setstate goldbars_toi invisible
		setstate goldbars_cm_marker invisible
	}

(Loffy) #2

Hi!
I must ask: Have you got the map to work, ie can you load it and run around in it?
If so, what happens when you steal a box, get all 4 boxes to the boat et cetera?
I have one suggestion at this point: Just have 1 goldbox. And get the map to work first.
Then we can add 3 more later on.
Tip: Have you seen this well written tutorial: http://www.planetwolfenstein.com/4newbies/objective.htm
Good luck!
//Loffy


(psyco_mario) #3

Hello (again).
Yes i can run around but when i put 2 goldcrates into boat it drives away :frowning:
i think i might need to use this:

trigger add_goldbar
{
accum 0 inc 1

  trigger gold_full_0 show 
  trigger gold_trans_0 hide 
  trigger gold_crate secured 

  accum 0 abort_if_less_than 4 

  trigger gold_full_1 show 
  trigger gold_trans_1 hide 
  trigger gold_full_2 show 
  trigger gold_trans_2 hide 
  trigger gold_full_3 show 
  trigger gold_trans_3 hide 

  trigger self truck_escape_msg 

  wm_announce "Allied team is escaping with the Gold Crates!" 

  wm_objective_status 4 0 2 
  wm_objective_status 4 1 1 

  wm_set_main_objective 5 0 
  wm_set_main_objective 5 1 

  setstate goldbars_toi invisible 
  setstate goldbars_cm_marker invisible 

}

Edit: tried the above truck only took on 2 (and showed one) of the goldcrates


(psyco_mario) #4

A week with no replies…
Is it always like this? :???:


(nUllSkillZ) #5

I’ve found the following (not sure if it will help you):


	trigger stuck_check_gold
	{
		accum 3 abort_if_not_equal 0

		accum 0 abort_if_greater_than 1

		accum 1 bitset 3
	}

So try to set it to:


	trigger stuck_check_gold
	{
		accum 3 abort_if_not_equal 0

		accum 0 abort_if_greater_than 3

		accum 1 bitset 3
	}


(psyco_mario) #6

i played with the script a bit A LOT and finnaly got the boat to move when all 4 goldcrates loaded :slight_smile:
but it STILL only shows 2 and a red-trans one in water

EDIT: i found the bit that positiones them (well at least i THINK it positions them…)

its here

gold_full_1
{
spawn
{
wait 500
attachtotag truck tag_obj2
faceangles 0 90 0 50

	setstate gold_full_1 invisible
}

trigger show
{
	setstate gold_full_1 default
}

Can someone please explain what the tag_objs are?


(psyco_mario) #7

erm…

bump?


(nUllSkillZ) #8

Hmm, you should try and ask in the mod section as this is a model specific question.
As far as I know tags are special “positions” of a model where you can attach entities to.


(The Wanderer) #9

a tag is just a triangle on a model that you use as a point to attach other objects. There’s really nothing special about them. Just make a right triangle and give it the name tag_<whatever>. The vertex at the 90 degree angle determines the pivot point and the vertex on the longest edge determines the front:

pivot






**

  • front

Once you’ve exported the md3 model just run md3totag.exe to create the tag file.
You can find md3totag here. Just place it in the same directory as your model and run it. It will automatically create the tag files for all models in the directory.

Once you’ve done this you can attach objects to the model through scripting by using the command attachtotag. For example if you wanted to attach a smoke entity to a plane model and assuming that your model was called plane and the tag name was tag_smoke you would just say [b]in the script block for the smoke entity

attachtotag plane tag_smoke[/b]

this would attach the smoke entity to the plane at the location of the tag so where ever the plane goes, the smoke follows.


(psyco_mario) #10

k, thanks is there a free md3.model editor i can get?

p.s. i like your sig, i must be perfect to then.


(psyco_mario) #11

bump.


(nUllSkillZ) #12

gmax is a free model-making program.
But I think you need some additional scripts to im- and export md3’s.
Milkshape is a shareware model-making program (around 25,- € / US-$).