Tiger
Posting Freak
Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation:
55
|
RE: following statues
(03-01-2013, 03:35 PM)Knusper. Wrote: I dont really get it
there are some things they dont work in my eyes...
It would be really cool if someone makes an example map.
I know its much work, if one of you would make that with like 16 areas (or maybe 9), it could help me really much.
That would really be awesome.
But only if someone has the time...
still a problem:
The active statues should disappear if a new one appears...
But that not that important
Script it so that when you hit a new area the old statue deactivates and the new one activates?
|
|
03-01-2013, 03:44 PM |
|
darksky
Member
Posts: 52
Threads: 8
Joined: Nov 2012
Reputation:
2
|
|
03-01-2013, 03:59 PM |
|
Knusper.
Member
Posts: 58
Threads: 7
Joined: Feb 2013
Reputation:
2
|
RE: following statues
My mind is blocked now, I cant really understand all.
Now I dont know if im wrong or you dont understand what I need.
I think im wrong
Im such a beginner...
I will ask my father, too, he is a program designer.
But an example would help the most...sorry
i just see the post above this... will test it now.
ok, I think i have a too high goal.
as you said, it do not work 100% :/
if you go the way back you see the statues coming towards you.
and for me it should not be a way, it should be a plane.
And there i see some points where it could not work...
If someone has an idea, tell it me.
otherwise i will try out some things by myself...
No one knows, how "I" goes.
(This post was last modified: 03-01-2013, 04:12 PM by Knusper..)
|
|
03-01-2013, 04:03 PM |
|
darksky
Member
Posts: 52
Threads: 8
Joined: Nov 2012
Reputation:
2
|
RE: following statues
you should try things yourself _before_ you ask for help.
maybe you should begin draw your idea on paper and write down what should happen when you enter area 1,area 2 ,...
if you have the correct algorithm, the implementation in amnesia should be easy
(This post was last modified: 03-01-2013, 04:22 PM by darksky.)
|
|
03-01-2013, 04:22 PM |
|
Adrianis
Senior Member
Posts: 620
Threads: 6
Joined: Feb 2012
Reputation:
27
|
RE: following statues
(03-01-2013, 04:03 PM)Knusper. Wrote: if you go the way back you see the statues coming towards you.
Which is why I pointed out the function you can use to stop that, with a little effort. Reading that post with the link to the function would have been a good idea. This is all very much possible, but not without effort.
|
|
03-01-2013, 06:49 PM |
|
Knusper.
Member
Posts: 58
Threads: 7
Joined: Feb 2013
Reputation:
2
|
RE: following statues
sorry...
I tried this:
void OnStart()
{
for(int i = 0; i < 4; i++)
{
SetEntityPlayerLookAtCallback
("statue_" + i, "checklookatstatue", false);
}
for (int i=0;i<4;i++)
{
AddEntityCollideCallback("Player","area_"+ i, "statueFunction", false, 1);
}
}
bool lookAt = false;
void checklookatstatue(string &in asEntity, int alState)
{
AddDebugMessage("checklookatstatue",false);
if(alState > 0)
{
lookAt = true;
}
else
{
lookAt = false;
}
}
string lastArea = "";
string activeStatue = "";
void statueFunction(string &in asParent, string &in asChild, int alState)
{
if(! lookAt)
{
string areanumber = StringSub(asChild, 5, 1);
AddDebugMessage(asChild,false);
AddDebugMessage(areanumber,false);
AddDebugMessage(lastArea,false);
SetEntityActive("statue_"+lastArea,true);
SetEntityActive(activeStatue,false);
activeStatue = "statue_"+lastArea;
lastArea = areanumber;
}
}
Now it works better. If you see any statue, like if you go backwards, the statues wont "follow" you.
But looking at a statue means not, that the statue is on the screen.
If you see the statue, but not in center (at the screen corner) it counts as you dont see it...
I know that from the debug messages.
so, still not 100% but a bit more..
I will go on working on it, if you have an idear you are welcome to tell me.
No one knows, how "I" goes.
(This post was last modified: 03-02-2013, 11:47 AM by Knusper..)
|
|
03-02-2013, 11:46 AM |
|
darksky
Member
Posts: 52
Threads: 8
Joined: Nov 2012
Reputation:
2
|
RE: following statues
you could try to add the lookatcallback to the areas instead of the statues
|
|
03-02-2013, 06:09 PM |
|
Knusper.
Member
Posts: 58
Threads: 7
Joined: Feb 2013
Reputation:
2
|
RE: following statues
thx, that makes it much better
im still working on this and it becomes better and better.
but i want to try out more than one way.
on the engine scripts page by fg i cant find a script to check out the
players position.
is there another page with more scripts or are all scripts existing on that page?
and i read today a thread, that its possible to make entities move.
For that i have to change the settings in the model editor.
maybe than there is a way to make it with path nodes.
No one knows, how "I" goes.
(This post was last modified: 03-03-2013, 09:14 AM by Knusper..)
|
|
03-03-2013, 09:13 AM |
|
Tiger
Posting Freak
Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation:
55
|
RE: following statues
(03-03-2013, 09:13 AM)Knusper. Wrote: maybe than there is a way to make it with path nodes.
I'm pretty sure that doesn't work and the player would be able to see the statue move, which imo ruins the effect, But if that's what you're going for, sure. Try it.
(This post was last modified: 03-03-2013, 10:12 AM by Tiger.)
|
|
03-03-2013, 10:09 AM |
|
|