(06-19-2013, 06:59 PM)Smoke Wrote: You'll have the chase music whenever you don't look at him though. Keep that in mind.
Changeable,
just use IFC
Yeah, but wont you delete all the chase music for all the monsters?
wont I? no what do you mean?
in the config files there should be an option for what file to use for chase music. just leave it blank. if its an IFC being used it wouldn't be a problem.
depends, unless your having the monster look for the player there's no problem. if you have the monster see the player's position (automatically making him chase the player), if you do that you could script in the music/terror meter.
void ShowEnemyPlayerPosition(string& "angel_statue_1);\\Makes angel follows player
This line is wrong in a few ways
Firstly when you are 'calling' a function (i.e. trying to run the function from within your script), you need to not include the 'void' keyword
Second, strings are always surrounded by "" , you've got one at the start, but you haven't got one at the end
Third, when you are providing a string as a 'parameter' for a function (i.e. the stuff you put in the brackets), you need to not include 'string&', that keyword is included in the actual code for the function to define the type of 'parameter' that you need to include, but when actually using the function as you are here, all you need to do is provide the parameter itself
Fourth, the slash character's you have included are the wrong way round! You've used \\, but the comments are defined by //
ShowEnemyPlayerPosition("angel_statue_1"); //Makes angel follows player
However there is a slightly more pressing issue - ShowEnemyPlayerPosition only works on entities that are set up to be enemies - so it can only work on a Grunt or a Brute, unless you set up a custom monster yourself. The angel statue that comes with the game is not set up as an enemy, so it can't chase the player, although you could just test this method using a grunt or brute, with the intention of changing that later
Quote:From what you guys told me I have compiled this: (I havent tried it yet because if i encounter any problems i dont want to spend hours on the internet trying to find out my script is wrong)
The absolute best and quickest way to learn how to write correct code is to write it, run it, find out that it's broken, then look for the solution. The error messages you will get are (usually) quite helpful in determining the problem. If you are waiting for people in the community to respond to every question it will slow you down a great deal. I guarantee you that all the problems you come across writing a line like the one above, other people have experienced as well, have created a thread about it and been given a solution, so the answers will be there if it goes wrong, and don't forget - you are never going to break the game with you're scripts, don't be afraid to experiment, it's the best way to learn
void ShowEnemyPlayerPosition(string& "angel_statue_1);\\Makes angel follows player
This line is wrong in a few ways
Firstly when you are 'calling' a function (i.e. trying to run the function from within your script), you need to not include the 'void' keyword
Second, strings are always surrounded by "" , you've got one at the start, but you haven't got one at the end
Third, when you are providing a string as a 'parameter' for a function (i.e. the stuff you put in the brackets), you need to not include 'string&', that keyword is included in the actual code for the function to define the type of 'parameter' that you need to include, but when actually using the function as you are here, all you need to do is provide the parameter itself
Fourth, the slash character's you have included are the wrong way round! You've used \\, but the comments are defined by //
ShowEnemyPlayerPosition("angel_statue_1"); //Makes angel follows player
However there is a slightly more pressing issue - ShowEnemyPlayerPosition only works on entities that are set up to be enemies - so it can only work on a Grunt or a Brute, unless you set up a custom monster yourself. The angel statue that comes with the game is not set up as an enemy, so it can't chase the player, although you could just test this method using a grunt or brute, with the intention of changing that later
Quote:From what you guys told me I have compiled this: (I havent tried it yet because if i encounter any problems i dont want to spend hours on the internet trying to find out my script is wrong)
The absolute best and quickest way to learn how to write correct code is to write it, run it, find out that it's broken, then look for the solution. The error messages you will get are (usually) quite helpful in determining the problem. If you are waiting for people in the community to respond to every question it will slow you down a great deal. I guarantee you that all the problems you come across writing a line like the one above, other people have experienced as well, have created a thread about it and been given a solution, so the answers will be there if it goes wrong, and don't forget - you are never going to break the game with you're scripts, don't be afraid to experiment, it's the best way to learn
So i have created this code so that the grunt acts like a weeping angel. But when i try to test this i get an error and the solution that comes with the error doesnt help. Can someone telll me what i did wrong.
(This post was last modified: 06-21-2013, 12:47 AM by lizardrock17.)