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
Possible to repeat script With.._
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Possible to repeat script With.._

Is it possible to repeat something, not the WHOLE script but just.. like on func thing, because i have a Cannon, and i want to let it "Shoot" a cannon ball, with propforce etc, and then like, Particle infront of it, so it looks liek it's actually shooting (help here to, is there a particle that looks like a mini explosion?! to use it on the cannon?) so, can i repeat them ALL, because my point is,
you're doing something, and then fell from a high thing, then like, sleep... and then wake up there but you're actually dreaming, and that's a dream palce, where there are 2 castles, fighting each other, with cannons, like you wake up, and see cannon's shooting!
i Actually wanted fog in this, but AMNESIA'S FOG IS *@#%&#$*^
but yeah, so i want to make it repeat, and can i move the player? like make a script, if you can, it owuld be very cool... this is liek a dream, to remember, what happened to you, in World War II...
04-15-2015, 01:45 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Possible to repeat script With.._

Repeat:
Yes. Use timers.
Look up "AddTimer" in the engine scripts.

Particle:
You can make it yourself in the particle editor.

Make player walk:
Yes. Check the engine scripst for that. MovePlayerForward I think it is. It has to be repeated quickly with a timer.

Fog:
Amnesia's fog is not bad. I don't know what problems you have with it.

Trying is the first step to success.
04-15-2015, 02:03 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: Possible to repeat script With.._

(04-15-2015, 02:03 PM)FlawlessHappiness Wrote: Repeat:
Yes. Use timers.
Look up "AddTimer" in the engine scripts.

Particle:
You can make it yourself in the particle editor.

Make player walk:
Yes. Check the engine scripst for that. MovePlayerForward I think it is. It has to be repeated quickly with a timer.

Fog:
Amnesia's fog is not bad. I don't know what problems you have with it.


Attached Files
.jpg   Untitled.jpg (Size: 394.1 KB / Downloads: 115)
04-15-2015, 02:11 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Possible to repeat script With.._

I don't think they used those kinda cannons during WW2...

But nevertheless, if you want one script that repeatedly fires a cannonball, create a function that does so. Start off with something like

PHP Code: (Select All)
void FireCannon()
{
    
//Do something.


In there you tell it to create a cannonball entity, push it away, play sounds, particles, use timers to make it work better etc. Then, whenever you need to fire a shot, just call FireCannon();

You do not need to use in-editor cannonballs, because those will run out. You're better off creating one through script.

(This post was last modified: 04-15-2015, 07:46 PM by Mudbill.)
04-15-2015, 07:46 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#5
RE: Possible to repeat script With.._

(04-15-2015, 07:46 PM)Mudbill Wrote: I don't think they used those kinda cannons during WW2...

But nevertheless, if you want one script that repeatedly fires a cannonball, create a function that does so. Start off with something like

PHP Code: (Select All)
void FireCannon()
{
    
//Do something.


In there you tell it to create a cannonball entity, push it away, play sounds, particles, use timers to make it work better etc. Then, whenever you need to fire a shot, just call FireCannon();

You do not need to use in-editor cannonballs, because those will run out. You're better off creating one through script.

Oh thanks, i will try it tomorrow!!
but i have another Question, about custom models, i made Spikeball thing, and i want it to let it move (from the script) and i heard you NEED to make the object Statecallback or something like that, what do i have to do?! now, the model works it;'s static, and the only 2 checkbox in "entity" is Affected by decal and something else, can i still make it move (with move, i mean it goes from mid to right, from right to left, from left, to right, from right to left ETC the whole time... can i make something like that in script?! i succesfully made the model, without any tutorials ( i was watching your tutorial, some days ago ) i didn't knew it would work, but yeah, i made a model within 25 min, i'm really happy, the texture also works, and the export etc worked aswell, i made the collision box > body etc, but is it possible to make it move, or do i need statecallbakc, so yeah, how....

Edit-Also : "I don't think they used those kinda cannons during WW2..."
I know xd, but there isn't any other good looking cannon in amnesia Sad and if the "fog" works good, then the you can't see the cannon's really good, because you're standing somehwere where you can't see the 2 cannons beside you, but with fox, i can "hide" the cannon a little bit on the other castle, but the fox is TOOOO much, or i don't know how to make it normal..> (srry for bad English)
(This post was last modified: 04-15-2015, 08:27 PM by Amnesiaplayer.)
04-15-2015, 08:26 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Possible to repeat script With.._

You need to make it an entity with a .ent file and the model editor.

Trying is the first step to success.
04-15-2015, 09:14 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#7
RE: Possible to repeat script With.._

Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.

(This post was last modified: 04-16-2015, 01:21 AM by Mudbill.)
04-16-2015, 01:19 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Possible to repeat script With.._

(04-16-2015, 01:19 AM)Mudbill Wrote: Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.

Huh?
Skyboxes also look weird if you use fog. Fog doesn't work on a skybox, so only everything else will be fog-ified.

If you use the domes that CarnivorousJellybean made, which are actual objects, then the fog will work.

Trying is the first step to success.
04-16-2015, 08:55 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#9
RE: Possible to repeat script With.._

(04-16-2015, 08:55 AM)FlawlessHappiness Wrote:
(04-16-2015, 01:19 AM)Mudbill Wrote: Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.

Huh?
Skyboxes also look weird if you use fog. Fog doesn't work on a skybox, so only everything else will be fog-ified.

If you use the domes that CarnivorousJellybean made, which are actual objects, then the fog will work.

Actually, the use of the skybox, even if it's just a plain black one, stops the background of a map from being really trippy if you have global map fog (not sure about the actual 'fog object', but I know it does have problems from the one in the a Level Settings).the background ends up remembering that something went past, and draws it until the camera is out of its view.

A similar effect can be created in Game Maker when you have an object (with a sprite) which moves around a map which has no background.

We may have just a different interpretation of 'weird' though! Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-16-2015, 09:10 AM by Romulator.)
04-16-2015, 09:09 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#10
RE: Possible to repeat script With.._

Ah! The global fog. I was thinking about the one you place.

Yea, the global fog is probably different.

Trying is the first step to success.
04-16-2015, 10:52 AM
Find




Users browsing this thread: 1 Guest(s)