Scripting probs with dyno


(Aikon) #1

Hey guys,

I’ve made a door which basically just is dynamitable. But when I want to open the game, it says: “SV_SetBrushModel NULL” , what does this mean? I’ve made a script for it by putting a few thing in there from other maps (see below).

I have the following entities:

  • A func_explosive: the entrance
  • A trigger_objective_info: a brush with the trigger texture
  • A trigger_objective_info: a brush with the origin texture

The door is pretty big, kinda like the one from Radar, and the entities have the following stats in-radient:
Door:

classname: func_explosive
targetname: ctrlroomentrance_obj1
scriptname: thecourtyard
health: 0

Door’s trigger_obj_info’s:

classname: trigger_objective_info
scriptname: entrance_trig
target: crtlroomentrance_obj1

The script: thecourtyard
->

//Map: Makoreactor Nr1
//created by Aikon

game_manager
{
 spawn
 {
  // Game Rules

  wm_axis_respawntime 1
  wm_allied_respawntime 1
  wm_number_of_objectives 1
  wm_set_round_timelimit 30

  // Objectives
  // 1. blow up the controlroomentrance

  // Current main objectives for each team (0=Axis, 1=Allies)
  wm_objective_status 1 0 0
  wm_objective_status 1 1 0

  // Accum #1 will be the state of objective number one
  accum 1 set 0
  accum 2 set 0

  // Set Defending Team for SW Mode

  wm_set_defending_team	1

 }

}

entrance_obj1
{

 spawn
 {
  accum 2 set 0
  wait 50
  constructible_class   3
  setstate maindoor1 default
 }

 death
 {
  trigger tank doors_destroyed
  trigger game_manager maindoor1_destroyed
 }
   
 defused
 {
  globalaccum 7 inc -1
  globalaccum 7 abort_if_not_equal 0    
 }   

}

ctrlroomentrance_trig
{

 spawn
 {
 }

 dynamited
 {
 globalaccum 7 inc 1
 globalaccum 7 abort_if_equal 0
 }

}

I sure hope someone of you guys can help me.


(blushing_bride) #2

im just looking at a working dyno wall and it has no brush with an origin texture so maybe its that causing the problem


(Java.Lang) #3

That error is caused by an origin brush without anything associated with it. Look for an origin brush floating around somewhere.

That may have been what blushing_bride was saying, but I read and reread what he said and still couldn’t figure out what he was saying for the life of me.


(Aikon) #4

The Origin brush is on the right upper corner of the Trigger brush, both brushes are trigger_objective_info. I don’t exactly understand where it has to be exactly, maybe you guys can gimme some directions?


(blushing_bride) #5

try deleting the origin brush (the brush with the origin texture on it in the top right of your picture). as far as i know from looking at a working sample of a dynamitable wall you do not need an origin brush.


(Aikon) #6

YES!!! W000T! Ok, now I understand, the origin brush is for doors only, actual doors which move and stuff, this one doesn’t even give a budge! Thanks a lot Blushing_bride & Java!!!


(blushing_bride) #7

the origin brush is for many things not just doors. i often have problems with them. I found the best way to avoid problems with origin brushes is to create them at the exact same time that you create the trigger/door/etc that it is attached to. So you select the origin and the trigger/door/etc at the same time and then give both of them their values at the same time. i dont why but when i make origin brushes without using this method i get the error you had.

EDIT: BTW you dont need to give the door a health value in ET its done via scripting


(nUllSkillZ) #8

I think you haven’'t made the trigger- and the origin-brush to one entity.
You have to select the trigger- and the origin-brush then rightclick and then choose the entity.


(mal^d^man) #9

yeah i had the problem and i did that and it seemed to have solved it

but anyway on the door you making unless it moves, there is no need for an origin brush


(FireFly) #10

A while ago I made a small testmap for Steelrat dealing with Dynamite / Scripting events.
Just have a look at it and see how it all works… You can download it here


(Aikon) #11

Thx a bunch, firefly, now I can actually have a ruins!