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
7 scripting questions i need help with
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#1
7 scripting questions i need help with

I have 4-5 scripting questions. If you could guide me to what procs i should be looking at then i think i might be able to figure it out from there.

1. Sets say i have an area and it triggers an hanged prisoner to start moving around (like swaying) I want it to do either of the two things...
(a) To move to another place
(b) Start moving around (like a wind hitting it or something)

2. I want to make an collision event when a certain item hits an enemy (say a knife hitting one of the brutes) how would i do this?

3. I have an insanity area set up and i want a note to appear from above and it would fall to the ground (any ideas)

4. Is it possible to give preconfigured items (say agrippas head for example) and give them different names and description?

5. How does nodes work and how do i make them work for the enemies?

[EDIT]

6. Is it possible to pick up other items that aren't usually picked up (may be question for fritctionalgames.)

7. How do i add quests after reading a diary or trying a door?

Rep if like me or im helpful or you love my stories!
Stephanos house
(This post was last modified: 11-10-2010, 11:14 AM by Gamemakingdude.)
11-10-2010, 05:05 AM
Find
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#2
RE: 7 scripting questions i need help with

1. You could do this with the SetEntityActive, unless you want the movement to be continous (not from a to b).
One way to do that, is to use the
void  AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
script

2. Just make it like you do with any other area, for example like this

void OnStart()
{
    AddEntityCollideCallback("Knife_01", "servant_grunt_01", "CollideKnifeHitsGrunt", true, 1);
}

CollideKnifeHitsGrunt(string &in asParent, string &in asChild, int alState)
{
      ///////Insert here the stuff you want to happen when the knife touches the grunt.
}

3. I have done similar with a corpse, just use the AddPropImpulse function (I'm not sure if this will work with notes, but technically it could)

4.I guess you could do it by making something like this to your lang file

    <CATEGORY Name="Inventory">
        <Entry Name="ItemName_AgrippaHead">/////Insert new name here</Entry>
        <Entry Name="ItemDesc_AgrippaHead">Insert new desc here</Entry>
                </CATEGORY>

5.Make a path by using pathnodes, starting from the enemy to where you want it to go. (notice that you might have to use a pathnode for every stair step for example) Then add a function like this to where you wish the patrol to start:

void AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);
for example:

AddEnemyPatrolNode("servant_brute_01", "//////(insert here the last pathnode you inserted (the destination node, e.g:)PathNodeArea_14", 0, "");

6. You can make items objects (if that's what you meant) by using the model editor. I'm not 100% on how that works

7. Just insert a function like this:

void AddQuest(string& asName, string& asNameAndTextEntry);

for example:
AddQuest("questtest3","questtest3");

then make a text entry (the same name as in the script) to the lang file, like this:

<CATEGORY Name = "Journal">
<Entry Name="Quest_questtest3_Text">/////Insert the quest text here</Entry>
</CATEGORY>
(This post was last modified: 11-10-2010, 02:57 PM by Hooumeri.)
11-10-2010, 02:56 PM
Find
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#3
RE: 7 scripting questions i need help with

Thanks a lot!

Rep if like me or im helpful or you love my stories!
Stephanos house
11-10-2010, 10:40 PM
Find




Users browsing this thread: 1 Guest(s)