Real coding option

Discussion and feedback on Construct 2

Post » Wed Jan 18, 2012 1:38 pm

Would it be possible to enable real coding?
(Of course as an option)

Despite this:


I'd like to write this:
---

var global text="abba";
var global number aaa=22;

if (Sprite.height<=10) {
Sprite.MoveToBottomLayer;
}

//This is comment.

if (Sprite2.8Direction.speed=55){
system.createObject(Sprite,0,sprite2.x+20,sprite2.y+20);
if (Sprite2.IsOverlapping(Sprite)){
    system.global.aaa=33;
}
}

if (system.compare(sprite.bullet.acceleration,99,equal) and syatem.layer[0].isVisible) {
sprite.opacity=45;
system.wait(1.0);
}

for (i=1,10,i++){
sprite.var1+=1;
}

if (sprite.bullet.speed>222){
system.forEach(Sprite) {
    sprite.y=33;
}
}

---

I would even pay additional money for this...tecbug2012-01-18 13:40:36
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Wed Jan 18, 2012 1:50 pm

Ashley has previously said that this is designed to be an event-driven system and he doesn't want to go down that route.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
126
S
29
G
72
Posts: 5,031
Reputation: 51,372

Post » Wed Jan 18, 2012 2:27 pm

So maybe event scripting option?

Maybe something like this:
event:action;

For example:
sprite.height=10 : sprite.movetobottomlayer;
or
sprite(height)=10 : sprite(movetobottomlayer)

B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Wed Jan 18, 2012 5:33 pm

This has been requested a lot in the past and we're not keen on it - Construct 2 is different in being entirely non-programming. There are loads and loads of tools out there for programming. If you really want to program I would have to say Construct 2 isn't the tool for you. We really want to make Construct 2 the best non-programming tool and scripting systems are a real distraction from that.
Scirra Founder
B
373
S
218
G
84
Posts: 23,450
Reputation: 186,130

Post » Wed Jan 18, 2012 5:47 pm

I'm reminded of the Python scripting option in Construct Classic. If you'd really like to put some programming in your games, you're probably better off with Construct Classic.
B
2
G
1
Posts: 8
Reputation: 541

Post » Wed Jan 18, 2012 5:54 pm

Don't forget you have access to everything that events can do in the plugin sdk.
Image Image
B
164
S
49
G
125
Posts: 7,796
Reputation: 85,046

Post » Wed Jan 18, 2012 8:51 pm

The main thing I am missing compared to regular programming is a search/replace function. If I copy behavior from one condition to another and then have to double-click 10 lines just to change the class name that sucks. In an editor that would be a 3 second fix.
B
12
S
3
G
3
Posts: 73
Reputation: 2,647

Post » Wed Jan 18, 2012 9:25 pm

I totally agree. That's main reason why I asked for this.
It's way easier in MMF2 - just drag'n'drop object icon to replace.tecbug2012-01-18 21:26:58
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Wed Jan 18, 2012 9:33 pm

I wouldn't mind having a replace feature. Once families have more features, I'll have to spend a lot of time replacing like, half my project manually with families.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Jan 18, 2012 9:47 pm

Yeah, a couple of features to make this easier has been on our todo list for a while now. Just been so much other stuff to do.
Scirra Founder
B
373
S
218
G
84
Posts: 23,450
Reputation: 186,130

Next

Return to Construct 2 General

Who is online

Users browsing this forum: GOObGONE and 4 guests