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
is it possible to...
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
is it possible to...

hello all !
i'm here and yes i have tons of questions Sad
(some peoples hate this)
so...
i learned every (most) scripting this.. but i don't know every possibility...
so i got 1 question about something BUT NOT FOR SCRIPT!
i'm going to search it up for my self Big Grin
i want to make 3 buttons... and 1 lever...
so 2 buttons are in 2 rooms...and the third button is in the middle place but is it possible to lock it ?! AND 1 lever is there to.. is it possible to do this :
click on that button (i'm going to make it big (2x2x2))
(gettign message) "You need to push 2 buttons , and 1 mainbreaker To turn on the Power"
and after clicking on those 2 buttons and 1 mainbreaker it is possible to click on that button... is that possible ?!
and if there is someone that played a game with this objective ?
do you know the name of the game Big Grin
08-21-2014, 07:43 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: is it possible to...

Mainbreaker?

This seems very much possible to do, but your explanation seems a little lacking. Nevertheless I think I know what you mean.

What I suggest you do is add a script area over your middle button. Add an interaction to that area that displays the message with SetMessage, and use variables on the other buttons to check when both have been pressed.

PHP Code: (Select All)
void PressButton(string &in asEntity)
{
    if(
GetLocalVarInt("Button1") == && GetLocalVarInt("Button2") == 1) {
        
SetEntityActive("Area"false);
        return;
    }
    else 
SetLocalVarInt(asEntity1);


This script should be ran on both the buttons on the sides. It will add a variable when you press them, and, when both have been pressed, disables the area covering your main button. When that area is gone, you can now interact with it instead of the area.

PS: This script assumes that your buttons are named Button1 and Button2 exactly. If you use different names, put those in the variable names.

If you want the player to have to pull the lever as well before interacting with the main button, then instead of having SetEntityActive in the script above, move it to the script for that lever's ConnectionStateChangeCallback.

PHP Code: (Select All)
void PullLever(string &in asEntityint alState)
{
    if(
GetLocalVarInt("Button1") == && GetLocalVarInt("Button2") == 1) {
        
SetEntityActive("Area"false);
    }


(This post was last modified: 08-21-2014, 08:46 PM by Mudbill.)
08-21-2014, 08:41 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: is it possible to...

Okey thanks Big Grin
but i downloaded a Cannon.. ( with an cannonball )
and i want that if you walk... you think you are save... but there is one path and that leads to a cannon... i put already the cannon if you are close the cannon shoots... but the cannonball (is really really ....) it even doesn't shoot .? it just fall from the place where a de Activated it.. (placed it) is it possible to make the (Cannonfire) faster ?! i added the music myself Big Grin
08-21-2014, 08:47 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: is it possible to...

Mostly unrelated to the OP, but have you applied a force to the cannonball? If you only activate it, it will fall down because of gravity. If you want it to move forwards you can either make it into a MoveObject that travels along the X or Z axis at a high speed, or use AddPropForce("Cannonball", 0, 0, 0, "world");

The three numbers must be changed to where you want to push it. If you want it up, for example, you'd make the second number -10000 or so. The axises depend on what direction you want it to fly in. Remember to match it up with the X and Z axises in the level editor.

08-21-2014, 08:52 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#5
RE: is it possible to...

it's this

AddPropForce("CannonBall", 10000, 0, 0, "world");

it goes a LITTLE bit to my wat but fall down..
08-21-2014, 08:54 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: is it possible to...

You can combine negative Y and positive X for a curve. If you use 10000 on X and -5000 on Y, perhaps that could work? Feel free to change the numbers if it's not powerful enough.

08-21-2014, 09:01 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#7
RE: is it possible to...

nope Sad just a little bit further... i'm trying higher Tongue

i just had this : AddPropForce("CannonBall", 10000, -100000, 0, "world");

and the cannon ball Fall down.. REALLY FAST... like what i would... that it come to me :S
(This post was last modified: 08-21-2014, 09:08 PM by Amnesiaplayer.)
08-21-2014, 09:04 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: is it possible to...

Y should not be negative. Negative Y means it will go down, and that's of course not what you want.
Use a positive Y to make the movement of the cannonball an arch ^^

Trying is the first step to success.
08-21-2014, 09:14 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#9
RE: is it possible to...

I think I'm too used to co-ordinate systems. -Y is usually up, but of course, this matches the level editor, so +Y is of course up. My bad.

08-21-2014, 09:17 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#10
RE: is it possible to...

so y is the third thing ?
08-21-2014, 09:17 PM
Find




Users browsing this thread: 1 Guest(s)