Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Script won't recogize edited .ent
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#1
[SOLVED] Script won't recogize edited .ent

Heres the .hps file:
PHP Code: (Select All)
void OnStart()
{
    
SetEntityPos("chem_chem"15.2010, -3.024, -36.407);
    
StartPlayerLookAt("note_fire"1.21.5"TheCastleWentUpInFlamesAndItsAllYourFaultYouTurd");
    
AddUseItemCallback("hcp""stone_hammer_chipper""hammer_smash""HammerSmash"false);
    
PreloadParticleSystem("ps_door_damage_wood.ps");
    
PreloadParticleSystem("ps_dust_elevator_crash.ps");
    
PreloadParticleSystem("ps_scare_pulse.ps");
    
PreloadParticleSystem("ps_dust_impact.ps");
    
PreloadSound("21_intro_scream.snt");
    
PreloadSound("20_bend_pipe.snt");
    
PreloadSound("13_machine_run.snt");
    
SetNPCAwake("jerry"falsefalse);
}

void FIRE(string &in asEntitystring &in asType)
{
    
AddTimer("firetimer"0.01"FireTime");
}

void FireTime(string &in asTimer)
{
    
StopPlayerLookAt();
    
AddQuest("Investigate""firefire");
    
GiveHint ("fired""Hints""fired"3);
}

void HammerSmash(string &in asItemstring &in asEntity)
{
    
CreateParticleSystemAtEntity("ps_door_damage_wood""ps_door_damage_wood.ps""hammer_smash_door"false);
    
PlayGuiSound("break_wood_metal1.ogg"1);
    
SetPropActiveAndFade("hammer_smash_door"false0.5);
    
CreateParticleSystemAtEntity("ps_dust_elevator_crash""ps_dust_elevator_crash.ps""hammer_smash_door"false);
    
CreateParticleSystemAtEntity("ps_scare_pulse""ps_scare_pulse.ps""hammer_smash_door"false);
    
CreateParticleSystemAtEntity("ps_dust_impact.ps""ps_dust_impact.ps""hammer_smash_door"false);
    
SetEntityPlayerInteractCallback("chemie""LA"true);
}

void LA(string &in asItem)
{
    
AddEntityCollideCallback("Player""SpookArea""AAA"true, -1);
    
AddUseItemCallback("""chemie""acid_con""AcidGet"true);
}

void AAA(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("SCREAM""21_intro_scream.snt""spooky"0false);
    
GiveSanityDamage(35true);
    
SetEntityActive("spooky"true);
    
SetEntityActive("jerry"true);
    
SetNPCAwake("jerry"truetrue);
    
SetEntityPlayerLookAtCallback("jerry""WALKON"true);
}

void WALKON(string &in asEntityint alState
{
    
AddEnemyPatrolNode("jerry""PathNodeArea_1"0.001"");
    
AddEnemyPatrolNode("jerry""PathNodeArea_2"0.001"");
    
AddEnemyPatrolNode("jerry""PathNodeArea_3"0.001"");
    
AddEnemyPatrolNode("jerry""PathNodeArea_4"0.001"");
    
AddEnemyPatrolNode("jerry""PathNodeArea_5"7"idle_extra2");
}

void AcidGet (string &in asItemstring &in asEntity)
{
    
AddTimer("acid_done"2"AcidDone");
    
FadeInSound("16_water_stream_heavy.snt"0.1true);
    
SetEntityPos("chem_chem", -15.541, -3.024, -36.407);
}

void AcidDone(string &in asTimer)
{
    
SetEntityPos("chem_chem"15.2010, -3.024, -36.407);
    
StopSound("16_water_stream_heavy.snt"0.5);


The entity is an edited container item ("chem_chem"), used as a visual representation of filling the container. I want it to be visible when you place the item over a script area, but it's still visible. I tried using item activating and it still won't recognize the .ent. Huh
(This post was last modified: 04-26-2015, 06:23 PM by A.M Team.)
04-26-2015, 04:37 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Script won't recogize edited .ent

Can you explain a bit more? Are you saying it's INvisible? As in not there?

04-26-2015, 05:34 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Script won't recogize edited .ent

(04-26-2015, 04:37 PM)TheDoctorPoo Wrote: I want it to be visible when you place the item over a script area, but it's still visible.

So... what is the problem?

Trying is the first step to success.
(This post was last modified: 04-26-2015, 05:41 PM by FlawlessHappiness.)
04-26-2015, 05:41 PM
Find
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#4
RE: Script won't recogize edited .ent

I wan't this .ent file to be moved outside the map (invisible), notice the move entity position script. UNTIL I use an item on an area, then it will move back to its original position attached to a machine.

BUT its not recognizing the entity's name, (chem_chem). Why? Huh

EDIT: It turned out that static objects can't move via script. I'm retarded...
(This post was last modified: 04-26-2015, 06:22 PM by A.M Team.)
04-26-2015, 05:45 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Script won't recogize edited .ent

Show us a picture of the name of the entity in the map.



The following is not correct. See next comment for clarification of what I meant.
Spoiler below!

Make sure the entity isn't a static entity. (This can be checked in the model editor)
A static object would look like this in the model editor:
[Image: 7dc346761b.png]
These entities cannot be set active nor inactive. I don't know if they can be moved though.


Trying is the first step to success.
(This post was last modified: 04-26-2015, 10:16 PM by FlawlessHappiness.)
04-26-2015, 06:18 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: [SOLVED] Script won't recogize edited .ent

Actually, Object > Static can be scripted, but not the default StaticProp type.

04-26-2015, 08:11 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: [SOLVED] Script won't recogize edited .ent

(04-26-2015, 08:11 PM)Mudbill Wrote: Actually, Object > Static can be scripted, but not the default StaticProp type.

Oh right, fuck... Sorry.
That's what I meant..

Trying is the first step to success.
04-26-2015, 10:15 PM
Find




Users browsing this thread: 3 Guest(s)