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
-Eyeroll- More Scripting problems!(FIXED!)
1xXxAcexXx1 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Sep 2011
Reputation: 0
#1
-Eyeroll- More Scripting problems!(FIXED!)

Problem solved, thank you all <3333
(This post was last modified: 09-08-2011, 03:45 PM by 1xXxAcexXx1.)
09-08-2011, 01:44 AM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#2
RE: -Eyeroll- More Scripting problems!

If you're sure the script is right, then check your map. Find all of the script areas used and MAKE SURE the names are correct. For you there should be one called push, Land, and there should be a door named ScareDoor.
After looking at it again, this looks EXACTLY like my tutorial. Did you look at it? xD

Ba-da bing, ba-da boom.
(This post was last modified: 09-08-2011, 02:00 AM by JenniferOrange.)
09-08-2011, 01:56 AM
Find
1xXxAcexXx1 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Sep 2011
Reputation: 0
#3
RE: -Eyeroll- More Scripting problems!

(09-08-2011, 01:56 AM)JenniferOrange Wrote: If you're sure the script is right, then check your map. Find all of the script areas used and MAKE SURE the names are correct. For you there should be one called push, Land, and there should be a door named ScareDoor.
After looking at it again, this looks EXACTLY like my tutorial. Did you look at it? xD
That's where I got it from lol. xD
hmn, so far I only have 3 script areas and those are it but I can shift the sound to go to "Land" and work from there.
As for the names of the scripts and door they are all matching so really I have no idea.



09-08-2011, 02:06 AM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: -Eyeroll- More Scripting problems!

Either you can send me over your map and script and I can do it for you, or I can just explain it to you if you'd rather not. o: I have a working 'Danielpush' in one of my maps.
Here's my script just for the heck of it:
void OnStart()
{
AddEntityCollideCallback("Player", "push", "FlyingDaniel", true, 1);
AddEntityCollideCallback("Player", "door_scare", "Slam", true, 1);
}
void FlyingDaniel(string &in asParent, string &in asChild, int alState)
{
StopMusic(0, 0);
PlaySoundAtEntity("", "react_pant.snt", "push", 0, false);
AddPlayerBodyForce(30000, 0, 0, false);
}
void Slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_1", true, true);
SetSwingDoorLocked("cellar_1", true, true);
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
}
void OnEnter()
{
}
void OnLeave()
{
}

Ba-da bing, ba-da boom.
(This post was last modified: 09-08-2011, 02:10 AM by JenniferOrange.)
09-08-2011, 02:08 AM
Find
1xXxAcexXx1 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Sep 2011
Reputation: 0
#5
RE: -Eyeroll- More Scripting problems!

(09-08-2011, 02:08 AM)JenniferOrange Wrote: Either you can send me over your map and script and I can do it for you, or I can just explain it to you if you'd rather not. o: I have a working 'Danielpush' in one of my maps.
Would be pretty lazy of me to ask you to do that lol. I need to learn so I don't have to run back here to beg for help xD. I get the general idea of the scripting but I -must- be overlooking something. x.x
09-08-2011, 02:11 AM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#6
RE: -Eyeroll- More Scripting problems!

Well you're missing
void OnEnter() .

It took me SO long to master the push. I had to play with values and lining everything up.. it's going to take some practice.
FOUND ERROR:
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
looking at your script "door_scare" does not exist. change that.
PlaySoundAtEntity("", "00_laugh.snt", "Land", 0, false);
Tell me if that does anything for you.

Ba-da bing, ba-da boom.
(This post was last modified: 09-08-2011, 02:16 AM by JenniferOrange.)
09-08-2011, 02:13 AM
Find
1xXxAcexXx1 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Sep 2011
Reputation: 0
#7
RE: -Eyeroll- More Scripting problems!

(09-08-2011, 02:13 AM)JenniferOrange Wrote: Well you're missing
void OnEnter() .

It took me SO long to master the push. I had to play with values and lining everything up.. it's going to take some practice.
I can tell, I've been working on this script for so long rofl. I'm on the verge of ragequitting.
As of now I put in void OnEnter() so would that have killed the entire script set? lol.
----------------------------------------
Fixed the error, but still nothing. I can walk passed the area without anything happening lol
(09-08-2011, 02:13 AM)JenniferOrange Wrote: FOUND ERROR:
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
looking at your script "door_scare" does not exist. change that.
PlaySoundAtEntity("", "00_laugh.snt", "Land", 0, false);
Tell me if that does anything for you.
Nope, nothing. Still can walk right passed the doorway. =.='

(This post was last modified: 09-08-2011, 02:30 AM by 1xXxAcexXx1.)
09-08-2011, 02:17 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: -Eyeroll- More Scripting problems!

Of what type is the area you're trying to collide with?

Tutorials: From Noob to Pro
09-08-2011, 04:52 AM
Website Find
1xXxAcexXx1 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Sep 2011
Reputation: 0
#9
RE: -Eyeroll- More Scripting problems!

(09-08-2011, 04:52 AM)Your Computer Wrote: Of what type is the area you're trying to collide with?
Its a script area, I just wanted him pushed through the door essentially and the door to lock behind.
(This post was last modified: 09-08-2011, 02:36 PM by 1xXxAcexXx1.)
09-08-2011, 02:31 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#10
RE: -Eyeroll- More Scripting problems!

(09-08-2011, 02:31 PM)1xXxAcexXx1 Wrote: Its a script area, I just wanted him pushed through the door essentially.

In that case, since the code you posted seems correct and since the area is of a type that supports collision, i have to question my assumptions.

I've been assuming you have everything named in accordance to what you have named in the script, i've been assuming the area is within the path of the player and that you've been colliding with it. If all of these are true, then my next guess is that your "dev environment" is set to create map caches. Check to see if there are any files that end in .map_cache in your maps directory. If so, delete them and try (test) again.

Tutorials: From Noob to Pro
09-08-2011, 02:42 PM
Website Find




Users browsing this thread: 1 Guest(s)