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
bug in my script!
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#1
bug in my script!

heres my script:

AddUseItemCallback("", "shank1", "shanktegrunt", "ShankFunc", true);

void ShankFunc(string &in asItem, string &in asEntity)
{
SetEntityActive("shanktegrunt", false);
RemoveItem("shank1");
}

it doesnt error, it just doesnt work (its very basic I know) but is there some game error where you cant use the "ceremony_knife.ent" on a grunt? I want the player to shank the grunt with it and (for now) have the grunt disappear but he doesnt :\
06-22-2011, 08:58 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: bug in my script!

ehm, where's your void OnStart()?
06-22-2011, 09:27 PM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#3
RE: bug in my script!

(06-22-2011, 09:27 PM)Roenlond Wrote: ehm, where's your void OnStart()?

Probably he just simply left it out. Perhaps you could make an area as large as the grunt? iirc you can use items on areas
06-22-2011, 09:35 PM
Find
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#4
RE: bug in my script!

yeah, but how do i make the area stick to the grunt?
and i left out the void OnStart of course
06-22-2011, 11:58 PM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#5
RE: bug in my script!

You can't. Perhaps you should remake the scene to something else, it sucks I know, done it several times. Just find another solution than stabbing him.
06-23-2011, 01:27 AM
Find
xiphirx Offline
Senior Member

Posts: 662
Threads: 16
Joined: Nov 2010
Reputation: 5
#6
RE: bug in my script!

Put the callback in onStart if you want it to work...

06-23-2011, 03:17 AM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#7
RE: bug in my script!

Try the
void FadeEnemyToSmoke(string& asName, bool abPlaySound);
Instantly fades an enemy to smoke.

if just deactivate doesnt work

void ShankFunc(string &in asItem, string &in asEntity)
{
FadeEnemyToSmoke("shankthegrunt", false);
RemoveItem("shank1");
}

(This post was last modified: 06-23-2011, 03:32 AM by Rownbear.)
06-23-2011, 03:31 AM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#8
RE: bug in my script!

(06-23-2011, 03:31 AM)Rownbear Wrote: Try the
void FadeEnemyToSmoke(string& asName, bool abPlaySound);
Instantly fades an enemy to smoke.

if just deactivate doesnt work

void ShankFunc(string &in asItem, string &in asEntity)
{
FadeEnemyToSmoke("shankthegrunt", false);
RemoveItem("shank1");
}

Everything works out fine. Except the part where you use the dagger on the grunt, it doesn't work like that. So either he'll need another item, or perhaps a script area, or just rethink and do something new.
06-23-2011, 03:34 AM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#9
RE: bug in my script!

(06-23-2011, 03:34 AM)rojkish Wrote:
(06-23-2011, 03:31 AM)Rownbear Wrote: Try the
void FadeEnemyToSmoke(string& asName, bool abPlaySound);
Instantly fades an enemy to smoke.

if just deactivate doesnt work

void ShankFunc(string &in asItem, string &in asEntity)
{
FadeEnemyToSmoke("shankthegrunt", false);
RemoveItem("shank1");
}

Everything works out fine. Except the part where you use the dagger on the grunt, it doesn't work like that. So either he'll need another item, or perhaps a script area, or just rethink and do something new.

I played a custom story where I used the dagger on the grunt, and you "killed" it. So it's possible with the dagger entity.

06-23-2011, 08:49 PM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#10
RE: bug in my script!


Quote:I played a custom story where I used the dagger on the grunt, and you "killed" it. So it's possible with the dagger entity.

Were the grunt standing still? In that case it seems pretty clear. Otherwise, could you perhaps link a script which works like that? It just seems weird since it didn't work out for me.
06-23-2011, 08:59 PM
Find




Users browsing this thread: 1 Guest(s)